Unverified Commit c3a997df by Scott Committed by GitHub

Merge pull request #597 from q2apro/patch-11

Fixes for MySQL 5.7 IGNORE_SPACE option
parents 347ef3cf 4543ca67
......@@ -260,7 +260,7 @@ function qa_db_table_definitions()
'content' => 'MEDIUMTEXT', // remainder of page HTML
'PRIMARY KEY (pageid)',
'KEY tags (tags)',
'UNIQUE position (position)',
'UNIQUE `position` (position)',
),
'widgets' => array(
......@@ -273,7 +273,7 @@ function qa_db_table_definitions()
'tags' => 'VARCHAR(' . QA_DB_MAX_WIDGET_TAGS_LENGTH . ') CHARACTER SET ascii NOT NULL', // comma-separated list of templates to display on
'title' => 'VARCHAR(' . QA_DB_MAX_WIDGET_TITLE_LENGTH . ') NOT NULL', // name of widget module that should be displayed
'PRIMARY KEY (widgetid)',
'UNIQUE position (position)',
'UNIQUE `position` (position)',
),
'posts' => array(
......@@ -870,8 +870,8 @@ function qa_db_upgrade_tables()
'qcount' => $definitions['categories']['qcount'],
'position' => $definitions['categories']['position'],
'PRIMARY KEY (categoryid)',
'UNIQUE tags (tags)',
'UNIQUE position (position)',
'UNIQUE `tags` (tags)',
'UNIQUE `position` (position)',
))); // hard-code list of columns and indexes to ensure we ignore any added at a later stage
$locktablesquery .= ', ^categories WRITE';
......@@ -896,8 +896,8 @@ function qa_db_upgrade_tables()
'heading' => $definitions['pages']['heading'],
'content' => $definitions['pages']['content'],
'PRIMARY KEY (pageid)',
'UNIQUE tags (tags)',
'UNIQUE position (position)',
'UNIQUE `tags` (tags)',
'UNIQUE `position` (position)',
))); // hard-code list of columns and indexes to ensure we ignore any added at a later stage
$locktablesquery .= ', ^pages WRITE';
qa_db_upgrade_query($locktablesquery);
......@@ -1037,7 +1037,7 @@ function qa_db_upgrade_tables()
'tags' => $definitions['widgets']['tags'],
'title' => $definitions['widgets']['title'],
'PRIMARY KEY (widgetid)',
'UNIQUE position (position)',
'UNIQUE `position` (position)',
)));
$locktablesquery .= ', ^widgets WRITE';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment