]> git.mjollnir.org Git - moodle.git/commitdiff
Change rule to tzrule (reserved word)
authorstronk7 <stronk7>
Tue, 22 Aug 2006 21:19:52 +0000 (21:19 +0000)
committerstronk7 <stronk7>
Tue, 22 Aug 2006 21:19:52 +0000 (21:19 +0000)
lib/db/install.xml
lib/db/migrate2utf8.xml
lib/db/mysql.php
lib/db/mysql.sql
lib/db/postgres7.php
lib/db/postgres7.sql
version.php

index ce5df1da88f0a173b4dab0d7a5a572797eeaa022..df7b27faeb2b6485c452a2cd148e02c5a8b0612f 100644 (file)
       <FIELDS>
         <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="false" SEQUENCE="true" ENUM="false" NEXT="name"/>
         <FIELD NAME="name" TYPE="char" LENGTH="100" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="year"/>
-        <FIELD NAME="year" TYPE="int" LENGTH="11" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="name" NEXT="rule"/>
-        <FIELD NAME="rule" TYPE="char" LENGTH="20" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="year" NEXT="gmtoff"/>
-        <FIELD NAME="gmtoff" TYPE="int" LENGTH="11" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="rule" NEXT="dstoff"/>
+        <FIELD NAME="year" TYPE="int" LENGTH="11" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="name" NEXT="tzrule"/>
+        <FIELD NAME="tzrule" TYPE="char" LENGTH="20" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="year" NEXT="gmtoff"/>
+        <FIELD NAME="gmtoff" TYPE="int" LENGTH="11" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="tzrule" NEXT="dstoff"/>
         <FIELD NAME="dstoff" TYPE="int" LENGTH="11" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="gmtoff" NEXT="dst_month"/>
         <FIELD NAME="dst_month" TYPE="int" LENGTH="2" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="dstoff" NEXT="dst_startday"/>
         <FIELD NAME="dst_startday" TYPE="int" LENGTH="3" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="dst_month" NEXT="dst_weekday"/>
       </SENTENCES>
     </STATEMENT>
   </STATEMENTS>
-</XMLDB>
\ No newline at end of file
+</XMLDB>
index c2030ebbfb643a3888c461cd36ca126c95760afe..9400f8272fabc8db8bcf1c55d7e86ebe5405fa11 100755 (executable)
     <TABLE name="timezone">
       <FIELDS>
         <FIELD name="name" method="NO_CONV" type="varchar" length="100" />
-        <FIELD name="rule" method="NO_CONV" type="varchar" length="20" />
+        <FIELD name="tzrule" method="NO_CONV" type="varchar" length="20" />
         <FIELD name="dst_time" method="NO_CONV" type="varchar" length="5" />
         <FIELD name="std_time" method="NO_CONV" type="varchar" length="5" />
       </FIELDS>
index 75c932ed16dd34000ff5332a1cdb1d0c9655f22e..6c4f900b612adef74c6712e90cda4745dfc76a2d 100644 (file)
@@ -2134,6 +2134,10 @@ function main_upgrade($oldversion=0) {
         execute_sql("ALTER TABLE `{$CFG->prefix}context` ADD UNIQUE INDEX `aggregatelevel-instanceid` (`aggregatelevel`, `instanceid`)",false);
     }
     
+    if ($oldversion < 2006082200) {
+        table_column('timezone', 'rule', 'tzrule', 'varchar', '20', '', '', 'not null', '');
+    }
+    
     return $result;
 }
 
index 91eaf980a96aaa3a1c0699ebef2e885e75f0232f..9ede4ab7550fe1090d54bc8561465c36f345d3d6 100644 (file)
@@ -554,7 +554,7 @@ CREATE TABLE `prefix_timezone` (
   `id` int(10) NOT NULL auto_increment,
   `name` varchar(100) NOT NULL default '',
   `year` int(11) NOT NULL default '0',
-  `rule` varchar(20) NOT NULL default '',
+  `tzrule` varchar(20) NOT NULL default '',
   `gmtoff` int(11) NOT NULL default '0',
   `dstoff` int(11) NOT NULL default '0',
   `dst_month` tinyint(2) NOT NULL default '0',
index 25fc25711561a8c3ccaf3fd3663983b58ee8e3a4..80ad8492d495e6a979420bd1c76a1842ffb498ce 100644 (file)
@@ -1732,6 +1732,11 @@ function main_upgrade($oldversion=0) {
         table_column('context', 'level', 'aggregatelevel', 'integer', '10', 'unsigned', '0', 'not null', '');
         modify_database('',"CREATE UNIQUE INDEX prefix_context_aggregatelevelinstanceid_idx ON prefix_context (aggregatelevel, instanceid);"); 
     }
+
+    if ($oldversion < 2006082200) {
+        table_column('timezone', 'rule', 'tzrule', 'varchar', '20', '', '', 'not null', '');
+    }
+
     return $result;
 }
 
index 06892277b3c9a2278705ffc7748a6f3bb9ad0945..f1f4537a14e8b8a8ce1229bf29c0b5bc00cbe3dd 100644 (file)
@@ -351,7 +351,7 @@ CREATE TABLE prefix_timezone (
   id SERIAL PRIMARY KEY,
   name varchar(100) NOT NULL default '',
   year integer NOT NULL default '0',
-  rule varchar(20) NOT NULL default '',
+  tzrule varchar(20) NOT NULL default '',
   gmtoff integer NOT NULL default '0',
   dstoff integer NOT NULL default '0',
   dst_month integer NOT NULL default '0',
index cb56c35a40f4d113c1eebb38c96862243c5471a2..49a30214e934454af0e6fe8aa5a3e5387dc16d4f 100644 (file)
@@ -6,7 +6,7 @@
 // This is compared against the values stored in the database to determine
 // whether upgrades should be performed (see lib/db/*.php)
 
-   $version = 2006082100;  // YYYYMMDD = date
+   $version = 2006082200;  // YYYYMMDD = date
                            //       XY = increments within a single day
 
    $release = '1.7 dev';    // Human-friendly version name