From fdf66cd36f36dc0984ce3b7d7bbcd63e1308535f Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Thu, 21 Jul 2011 14:23:25 +0000 Subject: [PATCH] added more NOT NULL constraints to database fields --- codepot/README | 2 +- codepot/codepot.spec.in | 2 +- codepot/etc/Makefile.am | 2 +- codepot/etc/{codepot.sql => codepot.mysql} | 50 +++++++++---------- .../src/codepot/models/subversionmodel.php | 4 +- 5 files changed, 30 insertions(+), 30 deletions(-) rename codepot/etc/{codepot.sql => codepot.mysql} (80%) diff --git a/codepot/README b/codepot/README index 0a2669ec..c4f62293 100644 --- a/codepot/README +++ b/codepot/README @@ -47,7 +47,7 @@ INSTALLATION * Customize CFGDIR/codepot.ini based on CFGDIR/codepot.ini-dist. - * Initialize database using CFGDIR/codepot.sql + * Initialize database using CFGDIR/codepot.mysql * Configure apache web server ahthentication for subversion webdav access using CFGDIR/codepot.a2ldap or CFGDIR/codepot.a2mysql diff --git a/codepot/codepot.spec.in b/codepot/codepot.spec.in index 88bb9a34..cb1917b2 100644 --- a/codepot/codepot.spec.in +++ b/codepot/codepot.spec.in @@ -43,7 +43,7 @@ rm -rf $RPM_BUILD_ROOT /var/www/html/codepot %config(noreplace) /etc/codepot/codepot.ini -/etc/codepot/codepot.sql +/etc/codepot/codepot.mysql /etc/codepot/codepot.a2ldap /etc/codepot/start-commit /etc/codepot/pre-commit diff --git a/codepot/etc/Makefile.am b/codepot/etc/Makefile.am index 9503fa79..b9c031a5 100644 --- a/codepot/etc/Makefile.am +++ b/codepot/etc/Makefile.am @@ -1,6 +1,6 @@ cfgdir=$(CFGDIR) -cfg_DATA = codepot.ini codepot.sql codepot.a2ldap +cfg_DATA = codepot.ini codepot.mysql codepot.a2ldap cfg_SCRIPTS = start-commit pre-commit post-commit pre-revprop-change post-revprop-change EXTRA_DIST = $(cfg_DATA) $(cfg_SCRIPTS) diff --git a/codepot/etc/codepot.sql b/codepot/etc/codepot.mysql similarity index 80% rename from codepot/etc/codepot.sql rename to codepot/etc/codepot.mysql index b527d663..17999e21 100644 --- a/codepot/etc/codepot.sql +++ b/codepot/etc/codepot.mysql @@ -6,10 +6,10 @@ CREATE TABLE site ( name VARCHAR(128) NOT NULL, text TEXT NOT NULL, - createdon DATETIME, - updatedon DATETIME, - createdby VARCHAR(32), - updatedby VARCHAR(32) + createdon DATETIME NOT NULL, + updatedon DATETIME NOT NULL, + createdby VARCHAR(32) NOT NULL, + updatedby VARCHAR(32) NOT NULL ) charset=utf8 engine=InnoDB; CREATE TABLE project ( @@ -18,10 +18,10 @@ CREATE TABLE project ( summary VARCHAR(255) NOT NULL, description TEXT NOT NULL, - createdon DATETIME, - updatedon DATETIME, - createdby VARCHAR(32), - updatedby VARCHAR(32) + createdon DATETIME NOT NULL, + updatedon DATETIME NOT NULL, + createdby VARCHAR(32) NOT NULL, + updatedby VARCHAR(32) NOT NULL ) charset=utf8 engine=InnoDB; @@ -37,12 +37,12 @@ CREATE TABLE project_membership ( CREATE TABLE wiki ( projectid VARCHAR(32) NOT NULL, name VARCHAR(255) NOT NULL, - text TEXT NOT NULL, + text TEXT NOT NULL, - createdon DATETIME, - updatedon DATETIME, - createdby VARCHAR(32), - updatedby VARCHAR(32), + createdon DATETIME NOT NULL, + updatedon DATETIME NOT NULL, + createdby VARCHAR(32) NOT NULL, + updatedby VARCHAR(32) NOT NULL, UNIQUE KEY wiki_id (projectid, name), @@ -56,8 +56,8 @@ CREATE TABLE wiki_attachment ( name VARCHAR(255) NOT NULL, encname VARCHAR(255) NOT NULL, - createdon DATETIME, - createdby VARCHAR(32), + createdon DATETIME NOT NULL, + createdby VARCHAR(32) NOT NULL, UNIQUE KEY wiki_attachment_id (projectid, wikiname, name), @@ -79,10 +79,10 @@ CREATE TABLE issue ( owner VARCHAR(255) NOT NULL, priority VARCHAR(32) NOT NULL, - createdon DATETIME, - updatedon DATETIME, - createdby VARCHAR(32), - updatedby VARCHAR(32), + createdon DATETIME NOT NULL, + updatedon DATETIME NOT NULL, + createdby VARCHAR(32) NOT NULL, + updatedby VARCHAR(32) NOT NULL, PRIMARY KEY (projectid, id), KEY issue_status_type_summary (projectid, status, type, summary), @@ -103,8 +103,8 @@ CREATE TABLE issue_change ( priority VARCHAR(32) NOT NULL, comment TEXT NOT NULL, - updatedon DATETIME, - updatedby VARCHAR(32), + updatedon DATETIME NOT NULL, + updatedby VARCHAR(32) NOT NULL, PRIMARY KEY (projectid, id, sno), KEY issue_update_time (projectid, id, updatedon), @@ -123,10 +123,10 @@ CREATE TABLE file ( md5sum CHAR(32) NOT NULL, description TEXT NOT NULL, - createdon DATETIME, - updatedon DATETIME, - createdby VARCHAR(32), - updatedby VARCHAR(32), + createdon DATETIME NOT NULL, + updatedon DATETIME NOT NULL, + createdby VARCHAR(32) NOT NULL, + updatedby VARCHAR(32) NOT NULL, UNIQUE KEY file_id (projectid, name), UNIQUE KEY (encname), diff --git a/codepot/src/codepot/models/subversionmodel.php b/codepot/src/codepot/models/subversionmodel.php index 76ee71b8..41b31216 100644 --- a/codepot/src/codepot/models/subversionmodel.php +++ b/codepot/src/codepot/models/subversionmodel.php @@ -514,8 +514,8 @@ class SubversionModel extends Model ## Sample svn_info() array ## [0] => Array ( - [path] => codepot.sql - [url] => file:///svn/test/codepot.sql + [path] => codepot.mysql + [url] => file:///svn/test/codepot.mysql [revision] => 27 [kind] => 1 [repos] => file:///svn/test