[Cs-webapplibs-commits] SF.net SVN: cs-webapplibs:[129] trunk/0.3/setup
Status: Beta
Brought to you by:
crazedsanity
From: <cra...@us...> - 2009-08-21 14:47:18
|
Revision: 129 http://cs-webapplibs.svn.sourceforge.net/cs-webapplibs/?rev=129&view=rev Author: crazedsanity Date: 2009-08-21 14:47:11 +0000 (Fri, 21 Aug 2009) Log Message: ----------- Update schema so all table prefixes are "cswal"... /setup/db_session_schema.mysql.sql: * remove all backticks. * change name from (invalid) "test.sess_tmp" to "cswal_session_store_table" /setup/db_session_schema.pgsql.sql: * update table prefix from "cs" to "cswal". /setup/schema.mysql.sql: * changed table prefixes from "cswdbl" to "cswal" /setup/schema.pgsql.sql: * changed table prefixes from "cswdbl" to "cswal" Modified Paths: -------------- trunk/0.3/setup/db_session_schema.mysql.sql trunk/0.3/setup/db_session_schema.pgsql.sql trunk/0.3/setup/schema.mysql.sql trunk/0.3/setup/schema.pgsql.sql Modified: trunk/0.3/setup/db_session_schema.mysql.sql =================================================================== --- trunk/0.3/setup/db_session_schema.mysql.sql 2009-08-20 21:09:10 UTC (rev 128) +++ trunk/0.3/setup/db_session_schema.mysql.sql 2009-08-21 14:47:11 UTC (rev 129) @@ -5,7 +5,7 @@ -- Idea originally from: http://www.developertutorials.com/tutorials/php/saving-php-session-data-database-050711 -- -CREATE TABLE `test`.`sess_tmp` ( +CREATE TABLE `cswal_session_store_table` ( `session_store_id` int NOT NULL AUTO_INCREMENT, `session_id` varchar(32) NOT NULL, `user_id` varchar(16) NOT NULL, Modified: trunk/0.3/setup/db_session_schema.pgsql.sql =================================================================== --- trunk/0.3/setup/db_session_schema.pgsql.sql 2009-08-20 21:09:10 UTC (rev 128) +++ trunk/0.3/setup/db_session_schema.pgsql.sql 2009-08-21 14:47:11 UTC (rev 129) @@ -5,7 +5,7 @@ -- Idea originally from: http://www.developertutorials.com/tutorials/php/saving-php-session-data-database-050711 -- -CREATE TABLE cs_session_store_table ( +CREATE TABLE cswal_session_store_table ( session_store_id serial NOT NULL PRIMARY KEY, session_id varchar(32) NOT NULL DEFAULT '' UNIQUE, user_id varchar(16), Modified: trunk/0.3/setup/schema.mysql.sql =================================================================== --- trunk/0.3/setup/schema.mysql.sql 2009-08-20 21:09:10 UTC (rev 128) +++ trunk/0.3/setup/schema.mysql.sql 2009-08-21 14:47:11 UTC (rev 129) @@ -22,10 +22,10 @@ -- -------------------------------------------------------- -- --- Table structure for table `cswdbl_category_table` +-- Table structure for table `cswal_category_table` -- -CREATE TABLE `cswdbl_category_table` ( +CREATE TABLE `cswal_category_table` ( `category_id` int(11) NOT NULL auto_increment, `category_name` text NOT NULL, PRIMARY KEY (`category_id`) @@ -34,10 +34,10 @@ -- -------------------------------------------------------- -- --- Table structure for table `cswdbl_class_table` +-- Table structure for table `cswal_class_table` -- -CREATE TABLE `cswdbl_class_table` ( +CREATE TABLE `cswal_class_table` ( `class_id` int(11) NOT NULL auto_increment, `class_name` text NOT NULL, PRIMARY KEY (`class_id`) @@ -46,26 +46,26 @@ -- -------------------------------------------------------- -- --- Table structure for table `cswdbl_event_table` +-- Table structure for table `cswal_event_table` -- -CREATE TABLE `cswdbl_event_table` ( +CREATE TABLE `cswal_event_table` ( `event_id` int(11) NOT NULL auto_increment, `class_id` int(11) NOT NULL, `category_id` int(11) NOT NULL, `description` text NOT NULL, PRIMARY KEY (`event_id`), - KEY `cswdbl_event_table_class_id_fkey` (`class_id`), - KEY `cswdbl_event_table_category_id_fkey` (`category_id`) + KEY `cswal_event_table_class_id_fkey` (`class_id`), + KEY `cswal_event_table_category_id_fkey` (`category_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- --- Table structure for table `cswdbl_log_table` +-- Table structure for table `cswal_log_table` -- -CREATE TABLE `cswdbl_log_table` ( +CREATE TABLE `cswal_log_table` ( `log_id` int(11) NOT NULL auto_increment, `creation` timestamp NOT NULL default CURRENT_TIMESTAMP, `event_id` int(11) NOT NULL, @@ -73,7 +73,7 @@ `affected_uid` int(11) NOT NULL, `details` text NOT NULL, PRIMARY KEY (`log_id`), - KEY `cswdbl_log_table_event_id_fkey` (`event_id`) + KEY `cswal_log_table_event_id_fkey` (`event_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; -- @@ -81,41 +81,41 @@ -- -- --- Constraints for table `cswdbl_event_table` +-- Constraints for table `cswal_event_table` -- -ALTER TABLE `cswdbl_event_table` - ADD CONSTRAINT `cswdbl_event_table_class_id_fkey` FOREIGN KEY (`class_id`) REFERENCES `cswdbl_class_table` (`class_id`), - ADD CONSTRAINT `cswdbl_event_table_category_id_fkey` FOREIGN KEY (`category_id`) REFERENCES `cswdbl_category_table` (`category_id`); +ALTER TABLE `cswal_event_table` + ADD CONSTRAINT `cswal_event_table_class_id_fkey` FOREIGN KEY (`class_id`) REFERENCES `cswal_class_table` (`class_id`), + ADD CONSTRAINT `cswal_event_table_category_id_fkey` FOREIGN KEY (`category_id`) REFERENCES `cswal_category_table` (`category_id`); -- --- Constraints for table `cswdbl_log_table` +-- Constraints for table `cswal_log_table` -- -ALTER TABLE `cswdbl_log_table` - ADD CONSTRAINT `cswdbl_log_table_event_id_fkey` FOREIGN KEY (`event_id`) REFERENCES `cswdbl_event_table` (`event_id`); +ALTER TABLE `cswal_log_table` + ADD CONSTRAINT `cswal_log_table_event_id_fkey` FOREIGN KEY (`event_id`) REFERENCES `cswal_event_table` (`event_id`); -- --- Table structure for table `cswdbl_log_attribute_table` +-- Table structure for table `cswal_log_attribute_table` -- -CREATE TABLE `cswdbl_log_attribute_table` ( +CREATE TABLE `cswal_log_attribute_table` ( `log_attribute_id` int(11) NOT NULL auto_increment, `log_id` int(11) NOT NULL, `attribute_id` int(11) NOT NULL, `value_text` text NOT NULL, PRIMARY KEY (`log_attribute_id`), - KEY `cswdbl_log_attribute_table_log_id_fkey` (`log_id`), - KEY `cswdbl_log_attribute_table_attribute_id_fkey` (`attribute_id`) + KEY `cswal_log_attribute_table_log_id_fkey` (`log_id`), + KEY `cswal_log_attribute_table_attribute_id_fkey` (`attribute_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- --- Table structure for table `cswdbl_log_table` +-- Table structure for table `cswal_log_table` -- -CREATE TABLE `cswdbl_log_table` ( +CREATE TABLE `cswal_log_table` ( `log_id` int(11) NOT NULL auto_increment, `creation` timestamp NOT NULL default CURRENT_TIMESTAMP, `event_id` int(11) NOT NULL, @@ -123,17 +123,17 @@ `affected_uid` int(11) NOT NULL, `details` text NOT NULL, PRIMARY KEY (`log_id`), - KEY `cswdbl_log_table_event_id_fkey` (`event_id`) + KEY `cswal_log_table_event_id_fkey` (`event_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; -- --- Constraints for table `cswdbl_log_attribute_table` +-- Constraints for table `cswal_log_attribute_table` -- -ALTER TABLE `cswdbl_log_attribute_table` - ADD CONSTRAINT `cswdbl_log_attribute_table_attribute_id_fkey` FOREIGN KEY (`attribute_id`) REFERENCES `cswdbl_attribute_table` (`attribute_id`), - ADD CONSTRAINT `cswdbl_log_attribute_table_log_id_fkey` FOREIGN KEY (`log_id`) REFERENCES `cswdbl_log_table` (`log_id`); +ALTER TABLE `cswal_log_attribute_table` + ADD CONSTRAINT `cswal_log_attribute_table_attribute_id_fkey` FOREIGN KEY (`attribute_id`) REFERENCES `cswal_attribute_table` (`attribute_id`), + ADD CONSTRAINT `cswal_log_attribute_table_log_id_fkey` FOREIGN KEY (`log_id`) REFERENCES `cswal_log_table` (`log_id`); Modified: trunk/0.3/setup/schema.pgsql.sql =================================================================== --- trunk/0.3/setup/schema.pgsql.sql 2009-08-20 21:09:10 UTC (rev 128) +++ trunk/0.3/setup/schema.pgsql.sql 2009-08-21 14:47:11 UTC (rev 129) @@ -14,7 +14,7 @@ -- a project management system with projects and issues, then there would -- be a category for "project" and for "issue". -- -CREATE TABLE cswdbl_category_table ( +CREATE TABLE cswal_category_table ( category_id serial NOT NULL PRIMARY KEY, category_name text NOT NULL ); @@ -25,7 +25,7 @@ -- that was created, "project" would be the category (see above) and the -- class would then be "create". -- -CREATE TABLE cswdbl_class_table ( +CREATE TABLE cswal_class_table ( class_id serial NOT NULL PRIMARY KEY, class_name text NOT NULL ); @@ -38,10 +38,10 @@ -- and make the description for that event more useful, especially if the -- logs are going to be displayed in any sort of useful manner. -- -CREATE TABLE cswdbl_event_table ( +CREATE TABLE cswal_event_table ( event_id serial NOT NULL PRIMARY KEY, - class_id integer NOT NULL REFERENCES cswdbl_class_table(class_id), - category_id integer NOT NULL REFERENCES cswdbl_category_table(category_id), + class_id integer NOT NULL REFERENCES cswal_class_table(class_id), + category_id integer NOT NULL REFERENCES cswal_category_table(category_id), description text NOT NULL ); @@ -54,10 +54,10 @@ -- (zero) for logging non-authenticated things, and a 1 (one) for activities -- performed by the system itself. -- -CREATE TABLE cswdbl_log_table ( +CREATE TABLE cswal_log_table ( log_id serial NOT NULL PRIMARY KEY, creation timestamp NOT NULL DEFAULT NOW(), - event_id integer NOT NULL REFERENCES cswdbl_event_table(event_id), + event_id integer NOT NULL REFERENCES cswal_event_table(event_id), uid integer NOT NULL, affected_uid integer NOT NULL, details text NOT NULL @@ -67,7 +67,7 @@ -- -- List of distinct attribute names. -- -CREATE TABLE cswdbl_attribute_table ( +CREATE TABLE cswal_attribute_table ( attribute_id serial NOT NULL PRIMARY KEY, attribute_name text NOT NULL UNIQUE ); @@ -75,10 +75,10 @@ -- -- Linkage for attributes to logs. -- -CREATE TABLE cswdbl_log_attribute_table ( +CREATE TABLE cswal_log_attribute_table ( log_attribute_id serial NOT NULL PRIMARY KEY, - log_id int NOT NULL REFERENCES cswdbl_log_table(log_id), - attribute_id int NOT NULL REFERENCES cswdbl_attribute_table(attribute_id), + log_id int NOT NULL REFERENCES cswal_log_table(log_id), + attribute_id int NOT NULL REFERENCES cswal_attribute_table(attribute_id), value_text text ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |