From: <wel...@us...> - 2011-07-22 14:44:02
|
Revision: 7527 http://planeshift.svn.sourceforge.net/planeshift/?rev=7527&view=rev Author: weltall2 Date: 2011-07-22 14:43:56 +0000 (Fri, 22 Jul 2011) Log Message: ----------- added creation dates to gm events and alliances patch by Cameron Clausen Modified Paths: -------------- trunk/src/server/database/mysql/alliances.sql trunk/src/server/database/mysql/gm_events.sql trunk/src/server/database/mysql/upgrade_schema.sql Modified: trunk/src/server/database/mysql/alliances.sql =================================================================== --- trunk/src/server/database/mysql/alliances.sql 2011-07-20 23:31:23 UTC (rev 7526) +++ trunk/src/server/database/mysql/alliances.sql 2011-07-22 14:43:56 UTC (rev 7527) @@ -10,9 +10,9 @@ DROP TABLE IF EXISTS `alliances`; CREATE TABLE alliances ( id int(11) NOT NULL auto_increment, + `date_created` TIMESTAMP default current_timestamp, name varchar(25) NOT NULL, leading_guild int(11) NOT NULL, - PRIMARY KEY (id), UNIQUE id (id), UNIQUE name (name) Modified: trunk/src/server/database/mysql/gm_events.sql =================================================================== --- trunk/src/server/database/mysql/gm_events.sql 2011-07-20 23:31:23 UTC (rev 7526) +++ trunk/src/server/database/mysql/gm_events.sql 2011-07-22 14:43:56 UTC (rev 7527) @@ -4,6 +4,7 @@ DROP TABLE IF EXISTS `gm_events`; CREATE TABLE `gm_events` ( `id` int(10) NOT NULL default '0', + `date_created` TIMESTAMP default current_timestamp, `name` varchar(40) NOT NULL default '', `description` blob NOT NULL, `status` int NOT NULL default '0', Modified: trunk/src/server/database/mysql/upgrade_schema.sql =================================================================== --- trunk/src/server/database/mysql/upgrade_schema.sql 2011-07-20 23:31:23 UTC (rev 7526) +++ trunk/src/server/database/mysql/upgrade_schema.sql 2011-07-22 14:43:56 UTC (rev 7527) @@ -1617,7 +1617,13 @@ UPDATE `server_options` SET `option_value`='1260' WHERE `option_name`='db_version'; ALTER TABLE `planeshift`.`sc_waypoints` MODIFY COLUMN `radius` DOUBLE(10,2) NOT NULL DEFAULT '0.00'; +# +# adds date_created fields to gm_events, alliances and bans +# +ALTER TABLE `gm_events` ADD `date_created` TIMESTAMP default current_timestamp AFTER `id`; +ALTER TABLE `alliances` ADD `date_created` TIMESTAMP default current_timestamp AFTER `id`; + # Insert your upgrade before this line. Remember when you set a new db_version # to update the server_options.sql file and update psserver.cpp as well. # This to ensure that everything is working if you use the create_all.sql to This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |