From 2c221ea67d0512961beea8fbcb30b23865c16bb0 Mon Sep 17 00:00:00 2001 From: wei <> Date: Wed, 20 Dec 2006 03:15:04 +0000 Subject: Add quickstart docs for Active Record and SqlMap --- .../SqlMap/scripts/mysql/other-init.sql | 87 ++-------------------- 1 file changed, 7 insertions(+), 80 deletions(-) (limited to 'tests/simple_unit/SqlMap/scripts/mysql/other-init.sql') diff --git a/tests/simple_unit/SqlMap/scripts/mysql/other-init.sql b/tests/simple_unit/SqlMap/scripts/mysql/other-init.sql index 0281527c..e3ed6b32 100644 --- a/tests/simple_unit/SqlMap/scripts/mysql/other-init.sql +++ b/tests/simple_unit/SqlMap/scripts/mysql/other-init.sql @@ -1,84 +1,11 @@ -use IBatisNet; - -drop table if exists Others; -drop table if exists A; -drop table if exists B; -drop table if exists C; -drop table if exists D; -drop table if exists E; -drop table if exists F; - -create table Others -( - Other_Int int, - Other_Long bigint, - Other_Bit bit not null default 0, - Other_String varchar(32) not null -) TYPE=INNODB; - -CREATE TABLE F ( - ID varchar(50) NOT NULL , - F_Libelle varchar(50) NULL , - primary key (ID) -) TYPE=INNODB; - -CREATE TABLE E ( - ID varchar(50) NOT NULL , - E_Libelle varchar(50) NULL , - primary key (ID) -) TYPE=INNODB; - -CREATE TABLE D ( - ID varchar(50) NOT NULL , - D_Libelle varchar(50) NULL , - primary key (ID) -) TYPE=INNODB; - -CREATE TABLE C ( - ID varchar(50) NOT NULL , - C_Libelle varchar(50) NULL , - primary key (ID) -) TYPE=INNODB; - - -CREATE TABLE B ( - ID varchar(50) NOT NULL , - C_ID varchar(50) NULL , - D_ID varchar(50) NULL , - B_Libelle varchar(50) NULL , - primary key (ID) -) TYPE=INNODB; - -ALTER TABLE B ADD CONSTRAINT FK_B_C FOREIGN KEY FK_B_C (C_ID) - REFERENCES C (ID) - ON DELETE RESTRICT - ON UPDATE RESTRICT, - ADD CONSTRAINT FK_B_D FOREIGN KEY FK_B_D (D_ID) - REFERENCES D (ID) - ON DELETE RESTRICT - ON UPDATE RESTRICT; - -CREATE TABLE A ( - ID varchar(50) NOT NULL , - B_ID varchar(50) NULL , - E_ID varchar(50) NULL , - F_ID varchar(50) NULL , - A_Libelle varchar(50) NULL , - primary key (ID) -) TYPE=INNODB; - -ALTER TABLE A ADD CONSTRAINT FK_A_B FOREIGN KEY FK_A_B (B_ID) - REFERENCES B (ID) - ON DELETE RESTRICT - ON UPDATE RESTRICT, - ADD CONSTRAINT FK_A_E FOREIGN KEY FK_A_E (E_ID) - REFERENCES E (ID) - ON DELETE RESTRICT - ON UPDATE RESTRICT, - ADD CONSTRAINT FK_A_F FOREIGN KEY FK_A_F (F_ID) - REFERENCES F (ID) - ON DELETE RESTRICT; +TRUNCATE `Others`; +TRUNCATE `A`; +TRUNCATE `B`; +TRUNCATE `C`; +TRUNCATE `D`; +TRUNCATE `E`; +TRUNCATE `F`; INSERT INTO Others VALUES(1, 8888888, 0, 'Oui'); INSERT INTO Others VALUES(2, 9999999999, 1, 'Non'); -- cgit v1.2.3