mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
add md5key field to end of hotpot_questions and hotpot_strings
This commit is contained in:
parent
5048c8d658
commit
3044600bf3
@ -66,9 +66,10 @@ CREATE TABLE prefix_hotpot_questions (
|
||||
type tinyint(4) unsigned NOT NULL default '0',
|
||||
text int(10) unsigned NOT NULL default '0',
|
||||
hotpot int(10) unsigned NOT NULL default '0',
|
||||
md5key varchar(32) NOT NULL default '',
|
||||
PRIMARY KEY (id),
|
||||
KEY hotpot_questions_name_idx (name(20)),
|
||||
KEY hotpot_questions_hotpot_idx (hotpot)
|
||||
KEY hotpot_questions_hotpot_idx (hotpot),
|
||||
KEY hotpot_questions_md5key_idx (md5key)
|
||||
) TYPE=MyISAM COMMENT='details about questions in Hot Potatoes quiz attempts';
|
||||
#
|
||||
# Table structure for table `hotpot_responses`
|
||||
@ -95,7 +96,8 @@ CREATE TABLE prefix_hotpot_responses (
|
||||
CREATE TABLE prefix_hotpot_strings (
|
||||
id int(10) unsigned NOT NULL auto_increment,
|
||||
string text NOT NULL default '',
|
||||
md5key varchar(32) NOT NULL default '',
|
||||
PRIMARY KEY (id),
|
||||
KEY hotpot_strings_string_idx (string(20))
|
||||
KEY hotpot_strings_md5key_idx (md5key)
|
||||
) TYPE=MyISAM COMMENT='strings used in Hot Potatoes questions and responses';
|
||||
|
||||
|
@ -74,12 +74,13 @@ CREATE TABLE prefix_hotpot_questions (
|
||||
name TEXT NOT NULL default '',
|
||||
type INT2 NOT NULL default '0',
|
||||
text INT4 NOT NULL default '0',
|
||||
hotpot INT4 NOT NULL default '0'
|
||||
hotpot INT4 NOT NULL default '0',
|
||||
md5key VARCHAR(32) NOT NULL default ''
|
||||
);
|
||||
COMMENT ON TABLE prefix_hotpot_questions IS 'details about questions in Hot Potatoes quiz attempts';
|
||||
|
||||
CREATE INDEX prefix_hotpot_questions_hotpot_idx ON prefix_hotpot_questions (hotpot);
|
||||
CREATE INDEX prefix_hotpot_questions_name_idx ON prefix_hotpot_questions (SUBSTR("name",20));
|
||||
CREATE INDEX prefix_hotpot_questions_md5key_idx ON prefix_hotpot_questions (md5key);
|
||||
|
||||
#
|
||||
# Table structure for table `hotpot_responses`
|
||||
@ -108,9 +109,10 @@ CREATE INDEX prefix_hotpot_responses_question_idx ON prefix_hotpot_responses (qu
|
||||
#
|
||||
|
||||
CREATE TABLE prefix_hotpot_strings (
|
||||
id SERIAL PRIMARY KEY,
|
||||
string TEXT NOT NULL default ''
|
||||
id SERIAL PRIMARY KEY,
|
||||
string TEXT NOT NULL default '',
|
||||
md5key VARCHAR(32) NOT NULL default ''
|
||||
);
|
||||
COMMENT ON TABLE prefix_hotpot_strings IS 'strings used in Hot Potatoes questions and responses';
|
||||
|
||||
CREATE INDEX prefix_hotpot_strings_string_idx ON prefix_hotpot_strings (SUBSTR("string",20));
|
||||
CREATE INDEX prefix_hotpot_strings_md5key_idx ON prefix_hotpot_strings (md5key);
|
||||
|
@ -15,7 +15,7 @@ function hotpot_update_to_v2_2() {
|
||||
// add new hotpot_questions.md5key field (and index)
|
||||
$table = 'hotpot_questions';
|
||||
$field = 'md5key';
|
||||
$ok = $ok && hotpot_db_update_field_type($table, '', $field, 'VARCHAR', 32, '', 'NOT NULL', '', 'name');
|
||||
$ok = $ok && hotpot_db_update_field_type($table, '', $field, 'VARCHAR', 32, '', 'NOT NULL', '');
|
||||
$ok = $ok && hotpot_db_add_index($table, $field);
|
||||
|
||||
// add new values hotpot_questions.md5key
|
||||
@ -38,7 +38,7 @@ function hotpot_update_to_v2_2() {
|
||||
// add new hotpot_strings.md5key field (and index)
|
||||
$table = 'hotpot_strings';
|
||||
$field = 'md5key';
|
||||
$ok = $ok && hotpot_db_update_field_type($table, '', $field, 'VARCHAR', 32, '', 'NOT NULL', '', 'string');
|
||||
$ok = $ok && hotpot_db_update_field_type($table, '', $field, 'VARCHAR', 32, '', 'NOT NULL', '');
|
||||
$ok = $ok && hotpot_db_add_index($table, $field);
|
||||
|
||||
// add new values hotpot_strings.md5key
|
||||
|
Loading…
x
Reference in New Issue
Block a user