mirror of https://github.com/apache/openjpa.git
208 lines
8.1 KiB
SQL
208 lines
8.1 KiB
SQL
-- =======================================================================
|
|
-- Drop All tables and recreate using default SynchronziedMappings properties
|
|
DROP TABLE ACCOUNT !
|
|
DROP TABLE ACCOUNT !
|
|
DROP TABLE ADDRESS!
|
|
DROP TABLE AEC !
|
|
DROP TABLE AEJB_1X1_BI_CASCADE!
|
|
DROP TABLE AEJB_1X1_UNI_BTOB!
|
|
DROP TABLE AEJB_1XM_BI_CASCADE!
|
|
DROP TABLE AEJB_1XM_BI_DELETE!
|
|
DROP TABLE AEJB_1XM_UNI_BTOB!
|
|
DROP TABLE AEJB_MX1_UNI_DELETE!
|
|
DROP TABLE AEJB_MXM_BI_BTOB!
|
|
DROP TABLE AEJB_MXM_BI_DELETE!
|
|
DROP TABLE AEJB_MXM_UNI_BTOB!
|
|
DROP TABLE ALIAS_TABLE!
|
|
DROP TABLE ANE_1XM_BI_BTOB !
|
|
DROP TABLE ANNUALREVIEW !
|
|
DROP TABLE A_ADDRESS!
|
|
DROP TABLE A_BASIC !
|
|
DROP TABLE BEANEJB_1X1_BI_BTOB!
|
|
DROP TABLE BEANEJB_1X1_BI_CASCADE!
|
|
DROP TABLE BEANEJB_1X1_UNI_BTOB!
|
|
DROP TABLE BEANEJB_1XM_BI_BTOB!
|
|
DROP TABLE BEANEJB_1XM_BI_CASCADE!
|
|
DROP TABLE BEANEJB_1XM_BI_DELETE!
|
|
DROP TABLE BEANEJB_1XM_UNI_BTOB!
|
|
DROP TABLE BEANEJB_MX1_UNI_BTOB!
|
|
DROP TABLE BEANEJB_MX1_UNI_DELETE!
|
|
DROP TABLE BEANEJB_MXM_BI_BTOB!
|
|
DROP TABLE BEANEJB_MXM_BI_DELETE!
|
|
DROP TABLE BEANEJB_MXM_UNI_BTOB!
|
|
DROP TABLE BEJB_1X1_BI_CASCADE!
|
|
DROP TABLE BEJB_1X1_UNI_BTOB!
|
|
DROP TABLE BEJB_1XM_BI_CASCADE!
|
|
DROP TABLE BEJB_1XM_BI_DELETE!
|
|
DROP TABLE BEJB_1XM_UNI_BTOB!
|
|
DROP TABLE BEJB_MX1_UNI_DELETE!
|
|
DROP TABLE BEJB_MXM_BI_BTOB!
|
|
DROP TABLE BEJB_MXM_BI_DELETE!
|
|
DROP TABLE BEJB_MXM_UNI_BTOB!
|
|
DROP TABLE BIDIR1X1PERSON !
|
|
DROP TABLE BIDIR1X1PROJECT !
|
|
DROP TABLE BIDIR1XMPERSON !
|
|
DROP TABLE BIDIR1XMPROJECT !
|
|
DROP TABLE BIDIRMX1PERSON !
|
|
DROP TABLE BIDIRMX1PROJECT !
|
|
DROP TABLE BIDIRMXMPERSON !
|
|
DROP TABLE BIDIRMXMPERSON_BIDIRMXMPROJECT !
|
|
DROP TABLE BIDIRMXMPROJECT !
|
|
DROP TABLE BNE_1XM_BI_BTOB !
|
|
DROP TABLE BOOK !
|
|
DROP TABLE BOOKSTORE !
|
|
DROP TABLE B_EMBEDDABLE !
|
|
DROP TABLE COFFEE !
|
|
DROP TABLE COLTAB !
|
|
DROP TABLE COLTAB_ADDRESS!
|
|
DROP TABLE COMPANY !
|
|
DROP TABLE COMPLAINT !
|
|
DROP TABLE CONSUMER !
|
|
DROP TABLE COURSE !
|
|
DROP TABLE COURSE_2 !
|
|
DROP TABLE COURSE_STUDENT!
|
|
DROP TABLE CREDITCARD_TABLE!
|
|
DROP TABLE CUBICLE !
|
|
DROP TABLE CUSTOMER1 !
|
|
DROP TABLE CUSTOMERS !
|
|
DROP TABLE CUSTOMER_TABLE !
|
|
DROP TABLE CUST_ORDER !
|
|
DROP TABLE DATATYPES !
|
|
DROP TABLE DATATYPES2 !
|
|
DROP TABLE DEPARTMENT !
|
|
DROP TABLE DEPARTMENT_2 !
|
|
DROP TABLE DID1BDEPENDENT !
|
|
DROP TABLE DID1BEMPLOYEE !
|
|
DROP TABLE DID1DEPENDENT !
|
|
DROP TABLE DID1EMPLOYEE !
|
|
DROP TABLE DID2BDEPENDENT !
|
|
DROP TABLE DID2BEMPLOYEE !
|
|
DROP TABLE DID2DEPENDENT !
|
|
DROP TABLE DID2EMPLOYEE !
|
|
DROP TABLE DID3BDEPENDENT !
|
|
DROP TABLE DID3BEMPLOYEE !
|
|
DROP TABLE DID3DEPENDENT !
|
|
DROP TABLE DID3EMPLOYEE !
|
|
DROP TABLE DID4BMEDICALHISTORY !
|
|
DROP TABLE DID4BPERSON !
|
|
DROP TABLE DID4MEDICALHISTORY !
|
|
DROP TABLE DID4PERSON !
|
|
DROP TABLE DID5BMEDICALHISTORY !
|
|
DROP TABLE DID5BPERSON !
|
|
DROP TABLE DID5MEDICALHISTORY !
|
|
DROP TABLE DID5PERSON !
|
|
DROP TABLE DID6BMEDICALHISTORY !
|
|
DROP TABLE DID6BPERSON !
|
|
DROP TABLE DID6MEDICALHISTORY !
|
|
DROP TABLE DID6PERSON !
|
|
DROP TABLE EMPLOYEE !
|
|
DROP TABLE EMPLOYEE_2 !
|
|
DROP TABLE EMP_MAPKEYCOL !
|
|
DROP TABLE ENROLLMENTS !
|
|
DROP TABLE FKEYS_MXM_BI_BTOB!
|
|
DROP TABLE FKEYS_MXM_BI_DELETE!
|
|
DROP TABLE FKEYS_MXM_UNI_BTOB!
|
|
DROP TABLE FKS_ALIAS_CUSTOMER!
|
|
DROP TABLE GENERATOR_TABLE !
|
|
DROP TABLE HARDWARE !
|
|
DROP TABLE INSURANCE !
|
|
DROP TABLE ITEM !
|
|
DROP TABLE LAWBOOK !
|
|
DROP TABLE LINEITEM_TABLE!
|
|
DROP TABLE MEMBER !
|
|
DROP TABLE MEMBER !
|
|
DROP TABLE MOVIETICKET !
|
|
DROP TABLE NAMEONLYINANNOTATION !
|
|
DROP TABLE NAMEONLYINXML !
|
|
DROP TABLE NAMEOVERRIDE !
|
|
DROP TABLE NOENTITYANNOTATION !
|
|
DROP TABLE NOENTITYLISTENER_TABLE !
|
|
DROP TABLE ORDER_TABLE!
|
|
DROP TABLE PARTTIMEEMPLOYEE !
|
|
DROP TABLE PERSON !
|
|
DROP TABLE PERSON_ANNUALREVIEW !
|
|
DROP TABLE PERSON_INSURANCE !
|
|
DROP TABLE PHONE_TABLE!
|
|
DROP TABLE PKEY !
|
|
DROP TABLE PRICED_PRODUCT_TABLE !
|
|
DROP TABLE PRODUCT_DETAILS !
|
|
DROP TABLE PRODUCT_TABLE !
|
|
DROP TABLE PROJECT!
|
|
DROP TABLE PROJECT_PERSON !
|
|
DROP TABLE PURCHASE_ORDER !
|
|
DROP TABLE RETAILORDER !
|
|
DROP TABLE RETAILORDER1 !
|
|
DROP TABLE RETAILORDER2 !
|
|
DROP TABLE RETAILORDER_CONSUMER !
|
|
DROP TABLE SEMESTER !
|
|
DROP TABLE SEQUENCE !
|
|
DROP TABLE STORE !
|
|
DROP TABLE STUDENT !
|
|
DROP TABLE STUDENT_2 !
|
|
DROP TABLE STUDENT_2_COURSE_2 !
|
|
DROP TABLE STUDENT_COURSE !
|
|
DROP TABLE TEAM !
|
|
DROP TABLE THEATRECOMPANY !
|
|
DROP TABLE THEATRECOMPANY1 !
|
|
DROP TABLE THEATRELOCATION !
|
|
DROP TABLE THEATRELOCATION1 !
|
|
DROP TABLE THEATRELOCATION_THEATRECOMPANY !
|
|
DROP TABLE UNI1X1PERSON !
|
|
DROP TABLE UNI1X1PROJECT !
|
|
DROP TABLE UNI1XMPERSON !
|
|
DROP TABLE UNI1XMPERSON !
|
|
DROP TABLE UNI1XMPERSON_UNI1XMPROJECT !
|
|
DROP TABLE UNI1XMPERSON_UNI1XMPROJECT !
|
|
DROP TABLE UNI1XMPROJECT !
|
|
DROP TABLE UNI1XMPROJECT !
|
|
DROP TABLE UNIMX1PERSON !
|
|
DROP TABLE UNIMX1PERSON !
|
|
DROP TABLE UNIMX1PROJECT !
|
|
DROP TABLE UNIMX1PROJECT !
|
|
DROP TABLE UNIMXMPERSON !
|
|
DROP TABLE UNIMXMPERSON_UNIMXMPROJECT !
|
|
DROP TABLE UNIMXMPROJECT !
|
|
DROP table FKS_ANOOP_CNOOP !
|
|
DROP table INFO_TABLE !
|
|
DROP table ORDER1 !
|
|
DROP table ORDER2 !
|
|
DROP table ORDER3 !
|
|
DROP table SPOUSE_TABLE !
|
|
|
|
-- =======================================================================
|
|
-- com.sun.ts.tests.ejb30.persistence.entitytest.cascadeall.oneXone
|
|
DROP TABLE AEJB_1X1_BI_BTOB !
|
|
CREATE TABLE AEJB_1X1_BI_BTOB (id VARCHAR(255) NOT NULL, name VARCHAR(255), value INTEGER, PRIMARY KEY (id)) !
|
|
DROP TABLE BEJB_1X1_BI_BTOB !
|
|
CREATE TABLE BEJB_1X1_BI_BTOB (id VARCHAR(255) NOT NULL, name VARCHAR(255), value INTEGER, FK_FOR_AEJB_1X1_BI_BTOB VARCHAR(255), PRIMARY KEY (id)) !
|
|
CREATE INDEX I_BJ1X1B_BTB_A1 ON BEJB_1X1_BI_BTOB (FK_FOR_AEJB_1X1_BI_BTOB) !
|
|
-- ALTER TABLE BEJB_1X1_BI_BTOB ADD CONSTRAINT FK_FOR_AEJB_1X1_BI FOREIGN KEY (FK_FOR_AEJB_1X1_BI_BTOB) REFERENCES AEJB_1X1_BI_BTOB (ID) !
|
|
|
|
-- =======================================================================
|
|
-- com.sun.ts.tests.ejb30.persistence.entitytest.cascadeall.oneXmany
|
|
DROP TABLE AEJB_1XM_BI_BTOB !
|
|
CREATE TABLE AEJB_1XM_BI_BTOB (id VARCHAR(255) NOT NULL, name VARCHAR(255), value INTEGER, PRIMARY KEY (id)) !
|
|
DROP TABLE BEJB_1XM_BI_BTOB !
|
|
CREATE TABLE BEJB_1XM_BI_BTOB (id VARCHAR(255) NOT NULL, name VARCHAR(255), value INTEGER, FK_FOR_AEJB_1XM_BI_BTOB VARCHAR(255), PRIMARY KEY (id)) !
|
|
CREATE INDEX I_BJ1XMTB_A1 ON BEJB_1XM_BI_BTOB (FK_FOR_AEJB_1XM_BI_BTOB) !
|
|
-- ALTER TABLE BEJB_1XM_BI_BTOB ADD CONSTRAINT FK_FOR_AEJB_1XM_BI FOREIGN KEY (FK_FOR_AEJB_1XM_BI_BTOB) REFERENCES AEJB_1XM_BI_BTOB (ID) !
|
|
|
|
-- =======================================================================
|
|
-- com.sun.ts.tests.ejb30.persistence.entitytest.cascadeall.manyXone
|
|
DROP TABLE AEJB_MX1_UNI_BTOB !
|
|
CREATE TABLE AEJB_MX1_UNI_BTOB (id VARCHAR(255) NOT NULL, name VARCHAR(255), value INTEGER, PRIMARY KEY (id)) !
|
|
DROP TABLE BEJB_MX1_UNI_BTOB !
|
|
CREATE TABLE BEJB_MX1_UNI_BTOB (id VARCHAR(255) NOT NULL, name VARCHAR(255), value INTEGER, FK_FOR_AEJB_MX1_UNI_BTOB VARCHAR(255), PRIMARY KEY (id)) !
|
|
CREATE INDEX I_BJMX1TB_A1 ON BEJB_MX1_UNI_BTOB (FK_FOR_AEJB_MX1_UNI_BTOB) !
|
|
-- ALTER TABLE BEJB_MX1_UNI_BTOB ADD CONSTRAINT FK_FOR_AEJB_MX1_UN FOREIGN KEY (FK_FOR_AEJB_MX1_UNI_BTOB) REFERENCES AEJB_MX1_UNI_BTOB (ID) !
|
|
|
|
-- =======================================================================
|
|
-- com/sun/ts/tests/ejb30/persistence/entitytest/biginteger
|
|
DROP TABLE A_BIGINTEGER !
|
|
CREATE TABLE A_BIGINTEGER ( ID VARCHAR(255), NAME VARCHAR(255) , VALUE INT, BASICINTEGER INT, BASICSHORT SMALLINT, BASICBIGSHORT SMALLINT, BASICFLOAT FLOAT, BASICBIGFLOAT FLOAT, BASICLONG BIGINT, BASICBIGLONG BIGINT, BASICDOUBLE DOUBLE, BASICBIGDOUBLE DOUBLE, BASICCHAR INTEGER, BASICCHARARRAY VARCHAR(448), BASICBIGCHARARRAY VARCHAR(448), BASICBYTEARRAY LONG VARCHAR FOR BIT DATA, BASICBIGBYTEARRAY LONG VARCHAR FOR BIT DATA, BASICBIGINTEGER DECIMAL(18,0) PRIMARY KEY NOT NULL, BASICBIGDECIMAL DECIMAL(18,0), BASICDATE DATE, BASICTIME TIME, BASICCALENDAR DATE, BASICTIMESTAMP TIMESTAMP ) !
|
|
|
|
-- =======================================================================
|
|
-- com/sun/ts/tests/ejb30/persistence/entitytest/bigdecimal
|
|
DROP TABLE A_BIGDECIMAL !
|
|
CREATE TABLE A_BIGDECIMAL ( ID VARCHAR(255), NAME VARCHAR(255) , VALUE INT, BASICINTEGER INT, BASICSHORT SMALLINT, BASICBIGSHORT SMALLINT, BASICFLOAT FLOAT, BASICBIGFLOAT FLOAT, BASICLONG BIGINT, BASICBIGLONG BIGINT, BASICDOUBLE DOUBLE, BASICBIGDOUBLE DOUBLE, BASICCHAR INTEGER, BASICCHARARRAY VARCHAR(448), BASICBIGCHARARRAY VARCHAR(448), BASICBYTEARRAY LONG VARCHAR FOR BIT DATA, BASICBIGBYTEARRAY LONG VARCHAR FOR BIT DATA, BASICBIGINTEGER DECIMAL(18,0), BASICBIGDECIMAL DECIMAL(18,0) PRIMARY KEY NOT NULL, BASICDATE DATE, BASICTIME TIME, BASICCALENDAR DATE, BASICTIMESTAMP TIMESTAMP ) !
|