mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 00:16:46 +02:00
Change rule to tzrule (reserved word)
This commit is contained in:
parent
7970cce9f4
commit
598dc3a99c
7 changed files with 17 additions and 8 deletions
|
@ -513,9 +513,9 @@
|
|||
<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"/>
|
||||
|
@ -1030,4 +1030,4 @@
|
|||
</SENTENCES>
|
||||
</STATEMENT>
|
||||
</STATEMENTS>
|
||||
</XMLDB>
|
||||
</XMLDB>
|
||||
|
|
|
@ -344,7 +344,7 @@
|
|||
<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>
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue