mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-08-20 04:30:42 +02:00
adding delete on cascade and fixing identation
This commit is contained in:
parent
37e9676687
commit
131a501508
@ -1,7 +1,8 @@
|
||||
CREATE TABLE COLLABORATOR (
|
||||
id INTEGER NOT NULL IDENTITY,
|
||||
email VARCHAR(255) NOT NULL,
|
||||
creation_date DATE);
|
||||
creation_date DATE
|
||||
);
|
||||
|
||||
CREATE TABLE USER (
|
||||
id INTEGER NOT NULL IDENTITY,
|
||||
@ -46,25 +47,26 @@ CREATE TABLE R_LABEL_MINDMAP (
|
||||
label_id INTEGER NOT NULL,
|
||||
PRIMARY KEY (mindmap_id, label_id),
|
||||
FOREIGN KEY (mindmap_id) REFERENCES MINDMAP (id),
|
||||
FOREIGN KEY (label_id) REFERENCES LABEL (id)
|
||||
FOREIGN KEY (label_id) REFERENCES LABEL (id) ON DELETE CASCADE ON UPDATE NO ACTION
|
||||
);
|
||||
|
||||
CREATE TABLE MINDMAP_HISTORY
|
||||
(id INTEGER NOT NULL IDENTITY,
|
||||
CREATE TABLE MINDMAP_HISTORY (
|
||||
id INTEGER NOT NULL IDENTITY,
|
||||
xml LONGVARBINARY NOT NULL,
|
||||
mindmap_id INTEGER NOT NULL,
|
||||
creation_date DATETIME,
|
||||
editor_id INTEGER NOT NULL,
|
||||
FOREIGN KEY (mindmap_id) REFERENCES MINDMAP (id));
|
||||
FOREIGN KEY (mindmap_id) REFERENCES MINDMAP (id)
|
||||
);
|
||||
|
||||
CREATE TABLE COLLABORATION_PROPERTIES
|
||||
(id INTEGER NOT NULL IDENTITY,
|
||||
CREATE TABLE COLLABORATION_PROPERTIES (
|
||||
id INTEGER NOT NULL IDENTITY,
|
||||
starred BOOLEAN NOT NULL,
|
||||
mindmap_properties VARCHAR(512)
|
||||
);
|
||||
|
||||
CREATE TABLE COLLABORATION
|
||||
(id INTEGER NOT NULL IDENTITY,
|
||||
CREATE TABLE COLLABORATION (
|
||||
id INTEGER NOT NULL IDENTITY,
|
||||
colaborator_id INTEGER NOT NULL,
|
||||
properties_id INTEGER NOT NULL,
|
||||
mindmap_id INTEGER NOT NULL,
|
||||
@ -75,8 +77,8 @@ CREATE TABLE COLLABORATION
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE TAG
|
||||
(id INTEGER NOT NULL IDENTITY,
|
||||
CREATE TABLE TAG (
|
||||
id INTEGER NOT NULL IDENTITY,
|
||||
name VARCHAR(255) NOT NULL,
|
||||
user_id INTEGER NOT NULL,
|
||||
--FOREIGN KEY(user_id) REFERENCES USER(colaborator_id)
|
||||
|
@ -33,7 +33,7 @@ CREATE TABLE R_LABEL_MINDMAP (
|
||||
label_id INTEGER NOT NULL,
|
||||
PRIMARY KEY (mindmap_id, label_id),
|
||||
FOREIGN KEY (mindmap_id) REFERENCES MINDMAP (id),
|
||||
FOREIGN KEY (label_id) REFERENCES LABEL (id)
|
||||
FOREIGN KEY (label_id) REFERENCES LABEL (id) ON DELETE CASCADE ON UPDATE NO ACTION
|
||||
);
|
||||
|
||||
CREATE TABLE MINDMAP (
|
||||
|
Loading…
Reference in New Issue
Block a user