[Cs-project-svn_notify] SF.net SVN: cs-project: [647] trunk
Brought to you by:
crazedsanity
From: <cra...@us...> - 2007-11-20 19:55:56
|
Revision: 647 http://cs-project.svn.sourceforge.net/cs-project/?rev=647&view=rev Author: crazedsanity Date: 2007-11-20 11:55:31 -0800 (Tue, 20 Nov 2007) Log Message: ----------- Database modifications to set priority based on associated tags (issue #77). Added Paths: ----------- trunk/docs/sql/upgrades/upgradeTo1.1.0-BETA14.sql trunk/upgrade/upgradeTo1.1.0-BETA14.php Copied: trunk/docs/sql/upgrades/upgradeTo1.1.0-BETA14.sql (from rev 646, trunk/docs/sql/upgrades/upgradeTo1.1.0-BETA13.sql) =================================================================== --- trunk/docs/sql/upgrades/upgradeTo1.1.0-BETA14.sql (rev 0) +++ trunk/docs/sql/upgrades/upgradeTo1.1.0-BETA14.sql 2007-11-20 19:55:31 UTC (rev 647) @@ -0,0 +1,13 @@ +-- +-- SVN INFORMATION::: +-- +-- SVN Signature::::::: $Id$ +-- Last Committted::::: $Date$ +-- Last Committed Path: $HeadURL$ +-- + + +ALTER TABLE tag_name_table ADD COLUMN modifier int; +UPDATE tag_name_table SET modifier = -1; +ALTER TABLE tag_name_table ALTER COLUMN SET DEFAULT -1; +ALTER TABLE tag_name_table SET NOT NULL; Copied: trunk/upgrade/upgradeTo1.1.0-BETA14.php (from rev 646, trunk/upgrade/upgradeTo1.1.0-BETA13.php) =================================================================== --- trunk/upgrade/upgradeTo1.1.0-BETA14.php (rev 0) +++ trunk/upgrade/upgradeTo1.1.0-BETA14.php 2007-11-20 19:55:31 UTC (rev 647) @@ -0,0 +1,57 @@ +<?php +/* + * Created on Nov 20, 2007 + */ + + +class upgrade_to_1_1_0_BETA14 extends dbAbstract { + + private $logsObj; + + //========================================================================= + public function __construct(cs_phpDB &$db) { + if(!$db->is_connected()) { + throw new exception(__METHOD__ .": database is not connected"); + } + $this->db = $db; + + $this->logsObj = new logsClass($this->db, 'Upgrade'); + + $this->gfObj = new cs_globalFunctions; + $this->gfObj->debugPrintOpt = DEBUGPRINTOPT; + }//end __construct() + //========================================================================= + + + + //========================================================================= + public function run_upgrade() { + + + $this->db->beginTrans(__METHOD__); + + $this->run_schema_changes(); + $this->update_tag_modifiers(); + + + $this->db->commitTrans(__METHOD__); + + }//end run_upgrade() + //========================================================================= + + + + //========================================================================= + private function run_schema_changes() { + + $this->gfObj->debug_print(__METHOD__ .": running SQL file..."); + $this->run_sql_file(dirname(__FILE__) .'/../docs/sql/upgrades/upgradeTo1.1.0-BETA14.sql'); + + $details = "Executed SQL file, '". $this->lastSQLFile ."'. Encoded contents::: ". + base64_encode($this->fsObj->read($this->lastSQLFile)); + $this->logsObj->log_by_class($details, 'system'); + }//end run_schema_changes() + //========================================================================= +} + +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |