mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AJAXPoll
synced 2024-11-15 03:04:14 +00:00
follow up r113839 fixes the initial database creation problem. relies on r113862 .
This commit is contained in:
parent
cf9125d794
commit
5be0d48bfe
Notes:
Thomas Gries
2012-03-14 21:43:56 +00:00
|
@ -19,7 +19,7 @@
|
|||
* @author Jack Phoenix <jack@countervandalism.net>
|
||||
* @author Thomas Gries
|
||||
* @maintainer Thomas Gries
|
||||
* @version 1.72
|
||||
* @version 1.73
|
||||
* @link http://www.mediawiki.org/wiki/Extension:AJAX_Poll Documentation
|
||||
*/
|
||||
|
||||
|
@ -31,7 +31,7 @@ if( !defined( 'MEDIAWIKI' ) ) {
|
|||
$wgExtensionCredits['parserhook'][] = array(
|
||||
'path' => __FILE__,
|
||||
'name' => 'AJAX Poll',
|
||||
'version' => '1.72 20120314',
|
||||
'version' => '1.73 20120314',
|
||||
'author' => array( 'Dariusz Siedlecki', 'Jack Phoenix', 'Thomas Gries' ),
|
||||
'descriptionmsg' => 'ajaxpoll-desc',
|
||||
'url' => 'https://www.mediawiki.org/wiki/Extension:AJAX_Poll',
|
||||
|
|
|
@ -399,23 +399,38 @@ class AJAXPoll {
|
|||
} else {
|
||||
// >= 1.17 support
|
||||
|
||||
# poll_info.poll_title field was dropped in AJAXPoll version 1.72
|
||||
$updater->dropExtensionField(
|
||||
'poll_info',
|
||||
'poll_title',
|
||||
dirname( __FILE__ ) . '/patches/drop-field--poll_info-poll_title.sql'
|
||||
);
|
||||
if ( $updater->extensionTableExists( 'poll_info' ) ) {
|
||||
# poll_info.poll_title field was dropped in AJAXPoll version 1.72
|
||||
$updater->dropExtensionField(
|
||||
'poll_info',
|
||||
'poll_title',
|
||||
dirname( __FILE__ ) . '/patches/drop-field--poll_info-poll_title.sql'
|
||||
);
|
||||
$updater->addExtensionTable(
|
||||
'ajaxpoll_info',
|
||||
dirname( __FILE__ ) . '/patches/rename-table--poll_info.sql'
|
||||
);
|
||||
} else {
|
||||
$updater->addExtensionTable(
|
||||
'ajaxpoll_info',
|
||||
dirname( __FILE__ ) . '/patches/create-table--ajaxpoll_info.sql'
|
||||
);
|
||||
}
|
||||
|
||||
$updater->addExtensionTable(
|
||||
'ajaxpoll_info',
|
||||
dirname( __FILE__ ) . '/patches/create-table--ajaxpoll_info.sql'
|
||||
);
|
||||
$updater->addExtensionTable(
|
||||
'ajaxpoll_vote',
|
||||
dirname( __FILE__ ) . '/patches/create-table--ajaxpoll_vote.sql'
|
||||
);
|
||||
if ( $updater->extensionTableExists( 'poll_vote' ) ) {
|
||||
$updater->addExtensionTable(
|
||||
'ajaxpoll_vote',
|
||||
dirname( __FILE__ ) . '/patches/rename-table--poll_vote.sql'
|
||||
);
|
||||
} else {
|
||||
$updater->addExtensionTable(
|
||||
'ajaxpoll_vote',
|
||||
dirname( __FILE__ ) . '/patches/create-table--ajaxpoll_vote.sql'
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
RENAME TABLE /*_*/poll_info TO /*_*/ajaxpoll_info;
|
||||
CREATE TABLE IF NOT EXISTS /*_*/ajaxpoll_info (
|
||||
`poll_id` varchar(32) NOT NULL PRIMARY KEY default '',
|
||||
`poll_txt` text,
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
RENAME TABLE /*_*/poll_vote TO /*_*/ajaxpoll_vote;
|
||||
CREATE TABLE IF NOT EXISTS /*_*/ajaxpoll_vote (
|
||||
`poll_id` varchar(32) NOT NULL default '',
|
||||
`poll_user` varchar(255) NOT NULL default '',
|
||||
|
|
1
patches/rename-table--poll_info.sql
Normal file
1
patches/rename-table--poll_info.sql
Normal file
|
@ -0,0 +1 @@
|
|||
RENAME TABLE /*_*/poll_info TO /*_*/ajaxpoll_info;
|
1
patches/rename-table--poll_vote.sql
Normal file
1
patches/rename-table--poll_vote.sql
Normal file
|
@ -0,0 +1 @@
|
|||
RENAME TABLE /*_*/poll_vote TO /*_*/ajaxpoll_vote;
|
Loading…
Reference in a new issue