follow up r113839 fixes the initial database creation problem. relies on r113862 .

This commit is contained in:
Thomas Gries 2012-03-14 21:43:56 +00:00
parent cf9125d794
commit 5be0d48bfe
Notes: Thomas Gries 2012-03-14 21:43:56 +00:00
6 changed files with 33 additions and 18 deletions

View file

@ -19,7 +19,7 @@
* @author Jack Phoenix <jack@countervandalism.net> * @author Jack Phoenix <jack@countervandalism.net>
* @author Thomas Gries * @author Thomas Gries
* @maintainer Thomas Gries * @maintainer Thomas Gries
* @version 1.72 * @version 1.73
* @link http://www.mediawiki.org/wiki/Extension:AJAX_Poll Documentation * @link http://www.mediawiki.org/wiki/Extension:AJAX_Poll Documentation
*/ */
@ -31,7 +31,7 @@ if( !defined( 'MEDIAWIKI' ) ) {
$wgExtensionCredits['parserhook'][] = array( $wgExtensionCredits['parserhook'][] = array(
'path' => __FILE__, 'path' => __FILE__,
'name' => 'AJAX Poll', 'name' => 'AJAX Poll',
'version' => '1.72 20120314', 'version' => '1.73 20120314',
'author' => array( 'Dariusz Siedlecki', 'Jack Phoenix', 'Thomas Gries' ), 'author' => array( 'Dariusz Siedlecki', 'Jack Phoenix', 'Thomas Gries' ),
'descriptionmsg' => 'ajaxpoll-desc', 'descriptionmsg' => 'ajaxpoll-desc',
'url' => 'https://www.mediawiki.org/wiki/Extension:AJAX_Poll', 'url' => 'https://www.mediawiki.org/wiki/Extension:AJAX_Poll',

View file

@ -399,23 +399,38 @@ class AJAXPoll {
} else { } else {
// >= 1.17 support // >= 1.17 support
if ( $updater->extensionTableExists( 'poll_info' ) ) {
# poll_info.poll_title field was dropped in AJAXPoll version 1.72 # poll_info.poll_title field was dropped in AJAXPoll version 1.72
$updater->dropExtensionField( $updater->dropExtensionField(
'poll_info', 'poll_info',
'poll_title', 'poll_title',
dirname( __FILE__ ) . '/patches/drop-field--poll_info-poll_title.sql' 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( $updater->addExtensionTable(
'ajaxpoll_info', 'ajaxpoll_info',
dirname( __FILE__ ) . '/patches/create-table--ajaxpoll_info.sql' dirname( __FILE__ ) . '/patches/create-table--ajaxpoll_info.sql'
); );
}
if ( $updater->extensionTableExists( 'poll_vote' ) ) {
$updater->addExtensionTable(
'ajaxpoll_vote',
dirname( __FILE__ ) . '/patches/rename-table--poll_vote.sql'
);
} else {
$updater->addExtensionTable( $updater->addExtensionTable(
'ajaxpoll_vote', 'ajaxpoll_vote',
dirname( __FILE__ ) . '/patches/create-table--ajaxpoll_vote.sql' dirname( __FILE__ ) . '/patches/create-table--ajaxpoll_vote.sql'
); );
}
} }
return true; return true;
} }

View file

@ -1,4 +1,3 @@
RENAME TABLE /*_*/poll_info TO /*_*/ajaxpoll_info;
CREATE TABLE IF NOT EXISTS /*_*/ajaxpoll_info ( CREATE TABLE IF NOT EXISTS /*_*/ajaxpoll_info (
`poll_id` varchar(32) NOT NULL PRIMARY KEY default '', `poll_id` varchar(32) NOT NULL PRIMARY KEY default '',
`poll_txt` text, `poll_txt` text,

View file

@ -1,4 +1,3 @@
RENAME TABLE /*_*/poll_vote TO /*_*/ajaxpoll_vote;
CREATE TABLE IF NOT EXISTS /*_*/ajaxpoll_vote ( CREATE TABLE IF NOT EXISTS /*_*/ajaxpoll_vote (
`poll_id` varchar(32) NOT NULL default '', `poll_id` varchar(32) NOT NULL default '',
`poll_user` varchar(255) NOT NULL default '', `poll_user` varchar(255) NOT NULL default '',

View file

@ -0,0 +1 @@
RENAME TABLE /*_*/poll_info TO /*_*/ajaxpoll_info;

View file

@ -0,0 +1 @@
RENAME TABLE /*_*/poll_vote TO /*_*/ajaxpoll_vote;