db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject svn commit: r398629 - in /db/jdo/branches/2.0/tck20/src/sql/derby: applicationidentity/schema.sql datastoreidentity/schema.sql
Date Mon, 01 May 2006 16:05:34 GMT
Author: mbo
Date: Mon May  1 09:05:30 2006
New Revision: 398629

URL: http://svn.apache.org/viewcvs?rev=398629&view=rev
Log:
JDO-375: adds names to the foreign key constraints for the company model in schema 0

Modified:
    db/jdo/branches/2.0/tck20/src/sql/derby/applicationidentity/schema.sql
    db/jdo/branches/2.0/tck20/src/sql/derby/datastoreidentity/schema.sql

Modified: db/jdo/branches/2.0/tck20/src/sql/derby/applicationidentity/schema.sql
URL: http://svn.apache.org/viewcvs/db/jdo/branches/2.0/tck20/src/sql/derby/applicationidentity/schema.sql?rev=398629&r1=398628&r2=398629&view=diff
==============================================================================
--- db/jdo/branches/2.0/tck20/src/sql/derby/applicationidentity/schema.sql (original)
+++ db/jdo/branches/2.0/tck20/src/sql/derby/applicationidentity/schema.sql Mon May  1 09:05:30
2006
@@ -161,8 +161,15 @@
 -------------------------
 
 ALTER TABLE departments DROP CONSTRAINT EMP_MO_FK;
+ALTER TABLE departments DROP CONSTRAINT DEPTS_COMP_FK;
 ALTER TABLE project_reviewer DROP CONSTRAINT PR_PROJ_FK;
 ALTER TABLE project_reviewer DROP CONSTRAINT PR_REV_FK;
+ALTER TABLE persons DROP CONSTRAINT PERS_DEPT_FK;
+ALTER TABLE persons DROP CONSTRAINT PERS_FUNDDEPT_FK;
+ALTER TABLE persons DROP CONSTRAINT PERS_MANAGER_FK;
+ALTER TABLE persons DROP CONSTRAINT PERS_MENTOR_FK;
+ALTER TABLE persons DROP CONSTRAINT PERS_HRADVISOR_FK;
+ALTER TABLE insuranceplans DROP CONSTRAINT INS_EMP_FK;
 DROP TABLE insuranceplans;
 DROP TABLE project_reviewer;
 DROP TABLE project_member;
@@ -190,8 +197,9 @@
     ID INTEGER NOT NULL,
     NAME VARCHAR(32) NOT NULL,
     EMP_OF_THE_MONTH INTEGER,
-    COMPANYID INTEGER REFERENCES companies,
+    COMPANYID INTEGER,
     DISCRIMINATOR VARCHAR(255),
+    CONSTRAINT DEPTS_COMP_FK FOREIGN KEY (COMPANYID) REFERENCES companies,
     CONSTRAINT DEPTS_PK PRIMARY KEY (ID)
 );
 
@@ -209,14 +217,19 @@
     COUNTRY VARCHAR(64),
     HIREDATE VARCHAR(32),
     WEEKLYHOURS REAL,
-    DEPARTMENT INTEGER REFERENCES departments,
-    FUNDINGDEPT INTEGER REFERENCES departments,
-    MANAGER INTEGER REFERENCES persons,
-    MENTOR INTEGER REFERENCES persons,
-    HRADVISOR INTEGER REFERENCES persons,
+    DEPARTMENT INTEGER,
+    FUNDINGDEPT INTEGER,
+    MANAGER INTEGER,
+    MENTOR INTEGER,
+    HRADVISOR INTEGER,
     SALARY REAL,
     WAGE REAL,
     DISCRIMINATOR varchar(64) NOT NULL,
+    CONSTRAINT PERS_DEPT_FK FOREIGN KEY (DEPARTMENT) REFERENCES departments,
+    CONSTRAINT PERS_FUNDDEPT_FK FOREIGN KEY (FUNDINGDEPT) REFERENCES departments,
+    CONSTRAINT PERS_MANAGER_FK FOREIGN KEY (MANAGER) REFERENCES persons,
+    CONSTRAINT PERS_MENTOR_FK FOREIGN KEY (MENTOR) REFERENCES persons,
+    CONSTRAINT PERS_HRADVISOR_FK FOREIGN KEY (HRADVISOR) REFERENCES persons,
     CONSTRAINT EMPS_PK PRIMARY KEY (PERSONID)
 );
 
@@ -226,7 +239,8 @@
     LIFETIME_ORTHO_BENEFIT DECIMAL(22,3),
     PLANTYPE VARCHAR(8),
     DISCRIMINATOR varchar(64) NOT NULL,
-    EMPLOYEE INTEGER REFERENCES persons,
+    EMPLOYEE INTEGER,
+    CONSTRAINT INS_EMP_FK FOREIGN KEY (EMPLOYEE) REFERENCES persons,
     CONSTRAINT INS_PK PRIMARY KEY (INSID)
 );
 

Modified: db/jdo/branches/2.0/tck20/src/sql/derby/datastoreidentity/schema.sql
URL: http://svn.apache.org/viewcvs/db/jdo/branches/2.0/tck20/src/sql/derby/datastoreidentity/schema.sql?rev=398629&r1=398628&r2=398629&view=diff
==============================================================================
--- db/jdo/branches/2.0/tck20/src/sql/derby/datastoreidentity/schema.sql (original)
+++ db/jdo/branches/2.0/tck20/src/sql/derby/datastoreidentity/schema.sql Mon May  1 09:05:30
2006
@@ -108,8 +108,15 @@
 -------------------------
 
 ALTER TABLE departments DROP CONSTRAINT EMP_MO_FK;
+ALTER TABLE departments DROP CONSTRAINT DEPTS_COMP_FK;
 ALTER TABLE project_reviewer DROP CONSTRAINT PR_PROJ_FK;
 ALTER TABLE project_reviewer DROP CONSTRAINT PR_REV_FK;
+ALTER TABLE persons DROP CONSTRAINT PERS_DEPT_FK;
+ALTER TABLE persons DROP CONSTRAINT PERS_FUNDDEPT_FK;
+ALTER TABLE persons DROP CONSTRAINT PERS_MANAGER_FK;
+ALTER TABLE persons DROP CONSTRAINT PERS_MENTOR_FK;
+ALTER TABLE persons DROP CONSTRAINT PERS_HRADVISOR_FK;
+ALTER TABLE insuranceplans DROP CONSTRAINT INS_EMP_FK;
 DROP TABLE insuranceplans;
 DROP TABLE project_reviewer;
 DROP TABLE project_member;
@@ -139,8 +146,9 @@
     ID INTEGER,
     NAME VARCHAR(32) NOT NULL,
     EMP_OF_THE_MONTH INTEGER,
-    COMPANYID INTEGER REFERENCES companies,
+    COMPANYID INTEGER,
     DISCRIMINATOR VARCHAR(255),
+    CONSTRAINT DEPTS_COMP_FK FOREIGN KEY (COMPANYID) REFERENCES companies,
     CONSTRAINT DEPTS_PK PRIMARY KEY (DATASTORE_IDENTITY)
 );
 
@@ -159,14 +167,19 @@
     COUNTRY VARCHAR(64),
     HIREDATE VARCHAR(32),
     WEEKLYHOURS REAL,
-    DEPARTMENT INTEGER REFERENCES departments,
-    FUNDINGDEPT INTEGER REFERENCES departments,
-    MANAGER INTEGER REFERENCES persons,
-    MENTOR INTEGER REFERENCES persons,
-    HRADVISOR INTEGER REFERENCES persons,
+    DEPARTMENT INTEGER,
+    FUNDINGDEPT INTEGER,
+    MANAGER INTEGER,
+    MENTOR INTEGER,
+    HRADVISOR INTEGER,
     SALARY REAL,
     WAGE REAL,
     DISCRIMINATOR varchar(64) NOT NULL,
+    CONSTRAINT PERS_DEPT_FK FOREIGN KEY (DEPARTMENT) REFERENCES departments,
+    CONSTRAINT PERS_FUNDDEPT_FK FOREIGN KEY (FUNDINGDEPT) REFERENCES departments,
+    CONSTRAINT PERS_MANAGER_FK FOREIGN KEY (MANAGER) REFERENCES persons,
+    CONSTRAINT PERS_MENTOR_FK FOREIGN KEY (MENTOR) REFERENCES persons,
+    CONSTRAINT PERS_HRADVISOR_FK FOREIGN KEY (HRADVISOR) REFERENCES persons,
     CONSTRAINT PERS_UK UNIQUE (PERSONID),
     CONSTRAINT PERS_PK PRIMARY KEY (DATASTORE_IDENTITY)
 );
@@ -178,7 +191,8 @@
     LIFETIME_ORTHO_BENEFIT DECIMAL(22,3),
     PLANTYPE VARCHAR(8),
     DISCRIMINATOR varchar(64) NOT NULL,
-    EMPLOYEE INTEGER REFERENCES persons,
+    EMPLOYEE INTEGER,
+    CONSTRAINT INS_EMP_FK FOREIGN KEY (EMPLOYEE) REFERENCES persons,
     CONSTRAINT INS_PK PRIMARY KEY (DATASTORE_IDENTITY)
 );
 



Mime
View raw message