Add OpenId required colums.

This commit is contained in:
Paulo Gustavo Veiga
2013-03-17 23:19:29 -03:00
parent 9b21c77485
commit 67398fe07e
7 changed files with 237 additions and 193 deletions

View File

@@ -1,10 +1,10 @@
INSERT INTO COLLABORATOR(id,email,creation_date) values (1,'test@wisemapping.org',CURDATE());
INSERT INTO USER (colaborator_id,firstname, lastname, password, activation_code,activation_date,allow_send_email)
values(1,'Test','User', 'ENC:a94a8fe5ccb19ba61c4c0873d391e987982fbbd3',1237,CURDATE(),1);
INSERT INTO COLLABORATOR (id, email, creation_date) VALUES (1, 'test@wisemapping.org', CURDATE());
INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code, activation_date, allow_send_email)
VALUES (1, 'Test', 'User', 'ENC:a94a8fe5ccb19ba61c4c0873d391e987982fbbd3', 1237, CURDATE(), 1);
INSERT INTO COLLABORATOR(id,email,creation_date) values (2,'admin@wisemapping.org',CURDATE());
INSERT INTO USER (colaborator_id,firstname, lastname, password, activation_code,activation_date,allow_send_email)
values(2,'Admin','User', 'admin',1237,CURDATE(),1);
INSERT INTO COLLABORATOR (id, email, creation_date) VALUES (2, 'admin@wisemapping.org', CURDATE());
INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code, activation_date, allow_send_email)
VALUES (2, 'Admin', 'User', 'admin', 1237, CURDATE(), 1);
COMMIT;

View File

@@ -1,73 +1,74 @@
CREATE TABLE COLLABORATOR (
id INTEGER NOT NULL IDENTITY,
email varchar(255) NOT NULL,
creation_date date);
id INTEGER NOT NULL IDENTITY,
email VARCHAR(255) NOT NULL,
creation_date DATE);
CREATE TABLE USER (
id INTEGER NOT NULL IDENTITY,
colaborator_id INTEGER NOT NULL,
auth_schema CHAR(1) NOT NULL,
firstname varchar(255) NOT NULL,
lastname varchar(255) NOT NULL,
password varchar(255) NOT NULL,
activation_code BIGINT NOT NULL,
activation_date DATE,
allow_send_email CHAR(1) NOT NULL,
locale varchar(5),
FOREIGN KEY(colaborator_id) REFERENCES COLLABORATOR(id)
id INTEGER NOT NULL IDENTITY,
colaborator_id INTEGER NOT NULL,
authentication_type CHAR(1) NOT NULL,
authenticator_uri VARCHAR(255) NULL,
firstname VARCHAR(255) NOT NULL,
lastname VARCHAR(255) NOT NULL,
password VARCHAR(255) NOT NULL,
activation_code BIGINT NOT NULL,
activation_date DATE,
allow_send_email CHAR(1) NOT NULL,
locale VARCHAR(5),
FOREIGN KEY (colaborator_id) REFERENCES COLLABORATOR (id)
);
CREATE TABLE MINDMAP (
id INTEGER NOT NULL IDENTITY,
title VARCHAR(255) NOT NULL,
description VARCHAR(255) NOT NULL,
xml LONGVARBINARY NOT NULL,
public BOOLEAN NOT NULL,
creation_date DATETIME,
edition_date DATETIME,
creator_id INTEGER NOT NULL,
tags varchar(1014) ,
last_editor_id INTEGER NOT NULL
id INTEGER NOT NULL IDENTITY,
title VARCHAR(255) NOT NULL,
description VARCHAR(255) NOT NULL,
xml LONGVARBINARY NOT NULL,
public BOOLEAN NOT NULL,
creation_date DATETIME,
edition_date DATETIME,
creator_id INTEGER NOT NULL,
tags VARCHAR(1014),
last_editor_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,
mindmap_id INTEGER NOT NULL,
creation_date DATETIME,
editor_id INTEGER NOT NULL,
FOREIGN KEY(mindmap_id) REFERENCES MINDMAP(id));
(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));
CREATE TABLE COLLABORATION_PROPERTIES
(id INTEGER NOT NULL IDENTITY,
starred BOOLEAN NOT NULL,
mindmap_properties varchar(512)
(id INTEGER NOT NULL IDENTITY,
starred BOOLEAN NOT NULL,
mindmap_properties VARCHAR(512)
);
CREATE TABLE COLLABORATION
(id INTEGER NOT NULL IDENTITY,
colaborator_id INTEGER NOT NULL,
properties_id INTEGER NOT NULL,
mindmap_id INTEGER NOT NULL,
role_id INTEGER NOT NULL,
FOREIGN KEY(colaborator_id) REFERENCES COLLABORATOR(id),
FOREIGN KEY(mindmap_id) REFERENCES MINDMAP(id),
FOREIGN KEY(properties_id) REFERENCES COLLABORATION_PROPERTIES(id)
(id INTEGER NOT NULL IDENTITY,
colaborator_id INTEGER NOT NULL,
properties_id INTEGER NOT NULL,
mindmap_id INTEGER NOT NULL,
role_id INTEGER NOT NULL,
FOREIGN KEY (colaborator_id) REFERENCES COLLABORATOR (id),
FOREIGN KEY (mindmap_id) REFERENCES MINDMAP (id),
FOREIGN KEY (properties_id) REFERENCES COLLABORATION_PROPERTIES (id)
);
CREATE TABLE TAG
(id INTEGER NOT NULL IDENTITY,
name varchar(255) NOT NULL,
user_id INTEGER NOT NULL,
(id INTEGER NOT NULL IDENTITY,
name VARCHAR(255) NOT NULL,
user_id INTEGER NOT NULL,
--FOREIGN KEY(user_id) REFERENCES USER(colaborator_id)
);
CREATE TABLE ACCESS_AUDITORY (
id INTEGER NOT NULL IDENTITY,
user_id INTEGER NOT NULL,
login_date date
id INTEGER NOT NULL IDENTITY,
user_id INTEGER NOT NULL,
login_date DATE
);
COMMIT;