From 5b691e780f7b7be0eb97600769bd08a4ccb8c568 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Thu, 29 Jan 2015 13:48:35 +0000 Subject: [PATCH] added the defintion of the new code_review table in codepot.mysql --- codepot/etc/codepot.mysql | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/codepot/etc/codepot.mysql b/codepot/etc/codepot.mysql index 017c3db6..5fabf307 100644 --- a/codepot/etc/codepot.mysql +++ b/codepot/etc/codepot.mysql @@ -68,7 +68,7 @@ CREATE TABLE wiki_attachment ( CONSTRAINT wiki_attachment_wikiid FOREIGN KEY (projectid,wikiname) REFERENCES wiki(projectid,name) ON DELETE RESTRICT ON UPDATE CASCADE -) charset=utf8 engine=InnoDB; +) charset=utf8 engine=InnoDB; CREATE TABLE issue ( projectid VARCHAR(32) NOT NULL, @@ -92,13 +92,13 @@ CREATE TABLE issue ( CONSTRAINT issue_projectid FOREIGN KEY (projectid) REFERENCES project(id) ON DELETE RESTRICT ON UPDATE CASCADE -) charset=utf8 engine=InnoDB; +) charset=utf8 engine=InnoDB; CREATE TABLE issue_change ( projectid VARCHAR(32) NOT NULL, id BIGINT NOT NULL, sno BIGINT NOT NULL, - + type VARCHAR(32) NOT NULL, status VARCHAR(32) NOT NULL, owner VARCHAR(255) NOT NULL, @@ -136,7 +136,7 @@ CREATE TABLE file ( CONSTRAINT file_projectid FOREIGN KEY (projectid) REFERENCES project(id) ON DELETE RESTRICT ON UPDATE CASCADE -) charset=utf8 engine=InnoDB; +) charset=utf8 engine=InnoDB; CREATE TABLE log ( id BIGINT PRIMARY KEY AUTO_INCREMENT, @@ -147,7 +147,7 @@ CREATE TABLE log ( message TEXT NOT NULL, createdon DATETIME NOT NULL, INDEX timed_project_type_action (createdon, projectid, type, action) -) charset=utf8 engine=InnoDB; +) charset=utf8 engine=InnoDB; CREATE TABLE user_settings ( userid VARCHAR(32) PRIMARY KEY, @@ -162,3 +162,21 @@ CREATE TABLE user ( email VARCHAR(255), enabled CHAR(1) NOT NULL DEFAULT 'N' CHECK(enabled in ('Y', 'N')) ) charset=utf8 engine=InnoDB; + +CREATE TABLE code_review ( + projectid VARCHAR(32) NOT NULL, + rev BIGINT NOT NULL, + sno BIGINT NOT NULL, + comment TEXT NOT NULL, + + createdon DATETIME NOT NULL, + createdby VARCHAR(32) NOT NULL, + + updatedon DATETIME NOT NULL, + updatedby VARCHAR(32) NOT NULL, + + UNIQUE KEY code_review_id (projectid, rev, sno), + + CONSTRAINT code_review_projectid FOREIGN KEY (projectid) REFERENCES project(id) + ON DELETE RESTRICT ON UPDATE CASCADE +) charset=utf8 engine=InnoDB;