mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 17:36:38 +02:00
Changes throughout Moodle to remove any reserved words from the
Moodle tables. ie user -> userid in many tables, plus in user_students start -> starttime and end -> endtime I've just done all this as carefully as I could ... I don't think I missed anything but it's pretty intensive work and I'd be fooling myself if I didn't think I'd missed a couple. Note that this version should pretty much be able to bootstrap itself using PostgreSQL now ... but this is untested
This commit is contained in:
parent
1f48942e7d
commit
ebc3bd2b24
68 changed files with 277 additions and 461 deletions
|
@ -14,6 +14,9 @@ function choice_upgrade($oldversion) {
|
|||
execute_sql(" ALTER TABLE `choice` ADD `answer5` varchar(255) NOT NULL AFTER `answer4`");
|
||||
execute_sql(" ALTER TABLE `choice` ADD `answer6` varchar(255) NOT NULL AFTER `answer5`");
|
||||
}
|
||||
if ($oldversion < 2002122300) {
|
||||
execute_sql("ALTER TABLE `choice_answers` CHANGE `user` `userid` INT(10) UNSIGNED DEFAULT '0' NOT NULL ");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ CREATE TABLE prefix_choice (
|
|||
CREATE TABLE prefix_choice_answers (
|
||||
id int(10) unsigned NOT NULL auto_increment,
|
||||
choice int(10) unsigned NOT NULL default '0',
|
||||
user int(10) unsigned NOT NULL default '0',
|
||||
userid int(10) unsigned NOT NULL default '0',
|
||||
answer tinyint(4) NOT NULL default '0',
|
||||
timemodified int(10) NOT NULL default '0',
|
||||
PRIMARY KEY (id),
|
||||
|
|
|
@ -4,16 +4,6 @@ function choice_upgrade($oldversion) {
|
|||
// This function does anything necessary to upgrade
|
||||
// older versions to match current functionality
|
||||
|
||||
if ($oldversion < 2002090800) {
|
||||
execute_sql(" ALTER TABLE `choice` CHANGE `answer1` `answer1` VARCHAR( 255 )");
|
||||
execute_sql(" ALTER TABLE `choice` CHANGE `answer2` `answer2` VARCHAR( 255 )");
|
||||
}
|
||||
if ($oldversion < 2002102400) {
|
||||
execute_sql(" ALTER TABLE `choice` ADD `answer3` varchar(255) NOT NULL AFTER `answer2`");
|
||||
execute_sql(" ALTER TABLE `choice` ADD `answer4` varchar(255) NOT NULL AFTER `answer3`");
|
||||
execute_sql(" ALTER TABLE `choice` ADD `answer5` varchar(255) NOT NULL AFTER `answer4`");
|
||||
execute_sql(" ALTER TABLE `choice` ADD `answer6` varchar(255) NOT NULL AFTER `answer5`");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ CREATE TABLE choice (
|
|||
CREATE TABLE choice_answers (
|
||||
id SERIAL PRIMARY KEY,
|
||||
choice integer NOT NULL default '0',
|
||||
"user" integer NOT NULL default '0',
|
||||
userid integer NOT NULL default '0',
|
||||
answer integer NOT NULL default '0',
|
||||
timemodified integer NOT NULL default '0'
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue