From 2aa68c3d4bbd78607caaa85a56d9716b6dfeb876 Mon Sep 17 00:00:00 2001 From: Ezequiel Bergamaschi Date: Tue, 21 Jan 2014 01:46:04 -0300 Subject: [PATCH] Revert "adding directory table to sql scripts" This reverts commit a7e0ef30fa8a061920c22e4cda6e6e92e83b7a92. --- config/database/hsql/create-schemas.sql | 11 +---------- config/database/mysql/create-schemas.sql | 17 +---------------- config/database/mysql/v3.0-to-v3.1.sql | 18 +----------------- config/database/postgres/create-schemas.sql | 11 +---------- 4 files changed, 4 insertions(+), 53 deletions(-) diff --git a/config/database/hsql/create-schemas.sql b/config/database/hsql/create-schemas.sql index f0469e72..69bf4c0e 100644 --- a/config/database/hsql/create-schemas.sql +++ b/config/database/hsql/create-schemas.sql @@ -28,19 +28,10 @@ CREATE TABLE MINDMAP ( edition_date DATETIME, creator_id INTEGER NOT NULL, tags VARCHAR(1014), - last_editor_id INTEGER NOT NULL, - directory_id INTEGER NOT NULL, + last_editor_id INTEGER NOT NULL --FOREIGN KEY(creator_id) REFERENCES USER(colaborator_id) ); -CREATE TABLE DIRECTORY ( - id INTEGER NOT NULL IDENTITY, - name VARCHAR(255) NOT NULL, - description VARCHAR(255) NOT NULL, - creator_id INTEGER NOT NULL, ---FOREIGN KEY (creator_id) REFERENCES USER (colaborator_id) -) - CREATE TABLE MINDMAP_HISTORY (id INTEGER NOT NULL IDENTITY, xml LONGVARBINARY NOT NULL, diff --git a/config/database/mysql/create-schemas.sql b/config/database/mysql/create-schemas.sql index 8e72f81a..4e26a3fc 100644 --- a/config/database/mysql/create-schemas.sql +++ b/config/database/mysql/create-schemas.sql @@ -28,19 +28,6 @@ CREATE TABLE USER ( ) CHARACTER SET utf8; -CREATE TABLE DIRECTORY ( - id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT, - name VARCHAR(255) - CHARACTER SET utf8 NOT NULL, - description VARCHAR(255) - CHARACTER SET utf8 NOT NULL, - creator_id INTEGER NOT NULL, - FOREIGN KEY (creator_id) REFERENCES USER (colaborator_id) - ON DELETE CASCADE - ON UPDATE NO ACTION -) - CHARACTER SET utf8; - CREATE TABLE MINDMAP ( id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT, title VARCHAR(255) @@ -55,9 +42,7 @@ CREATE TABLE MINDMAP ( tags VARCHAR(1014) CHARACTER SET utf8, last_editor_id INTEGER NOT NULL, - directory_id INTEGER NOT NULL, - FOREIGN KEY (creator_id) REFERENCES USER (colaborator_id), - FOREIGN KEY (directory_id) REFERENCES DIRECTORY (id) + FOREIGN KEY (creator_id) REFERENCES USER (colaborator_id) ON DELETE CASCADE ON UPDATE NO ACTION ) diff --git a/config/database/mysql/v3.0-to-v3.1.sql b/config/database/mysql/v3.0-to-v3.1.sql index d75b35d1..4f7b822a 100644 --- a/config/database/mysql/v3.0-to-v3.1.sql +++ b/config/database/mysql/v3.0-to-v3.1.sql @@ -2,20 +2,4 @@ ALTER TABLE `USER` ADD COLUMN `authentication_type` CHAR(1) CHARACTER SET utf8 N AFTER `colaborator_id`; ALTER TABLE `USER` ADD COLUMN `authenticator_uri` VARCHAR(255) CHARACTER SET utf8 -AFTER `authentication_type`; - -CREATE TABLE DIRECTORY ( - id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT, - name VARCHAR(255) - CHARACTER SET utf8 NOT NULL, - description VARCHAR(255) - CHARACTER SET utf8 NOT NULL, - creator_id INTEGER NOT NULL, - FOREIGN KEY (creator_id) REFERENCES USER (colaborator_id) - ON DELETE CASCADE - ON UPDATE NO ACTION -) - CHARACTER SET utf8; - -ALTER TABLE `MINDMAP` ADD COLUMN `directory_id` INTEGER NOT NULL DEFAULT '/' -AFTER `last_editor_id` \ No newline at end of file +AFTER `authentication_type`; \ No newline at end of file diff --git a/config/database/postgres/create-schemas.sql b/config/database/postgres/create-schemas.sql index fd0aa15a..723cc2dd 100644 --- a/config/database/postgres/create-schemas.sql +++ b/config/database/postgres/create-schemas.sql @@ -30,19 +30,10 @@ CREATE TABLE MINDMAP ( edition_date TIMESTAMP, creator_id INTEGER NOT NULL, tags VARCHAR(1014), - last_editor_id INTEGER NOT NULL, - directory_id INTEGER NOT NULL--, + last_editor_id INTEGER NOT NULL --, --FOREIGN KEY(creator_id) REFERENCES "USER"(colaborator_id) ON DELETE CASCADE ON UPDATE NO ACTION ); -CREATE TABLE DIRECTORY ( - id SERIAL NOT NULL PRIMARY KEY, - title VARCHAR(255) NOT NULL, - description VARCHAR(255) NOT NULL, - creator_id INTEGER NOT NULL, - --FOREIGN KEY(creator_id) REFERENCES "USER"(colaborator_id) ON DELETE CASCADE ON UPDATE NO ACTION -); - CREATE TABLE MINDMAP_HISTORY (id SERIAL NOT NULL PRIMARY KEY,