dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3dbb621
)
Add dropTable method
author
Sam Reed
<reedy@users.mediawiki.org>
Thu, 27 Oct 2011 23:07:04 +0000
(23:07 +0000)
committer
Sam Reed
<reedy@users.mediawiki.org>
Thu, 27 Oct 2011 23:07:04 +0000
(23:07 +0000)
includes/installer/DatabaseUpdater.php
patch
|
blob
|
history
diff --git
a/includes/installer/DatabaseUpdater.php
b/includes/installer/DatabaseUpdater.php
index
80dbe30
..
b21f694
100644
(file)
--- a/
includes/installer/DatabaseUpdater.php
+++ b/
includes/installer/DatabaseUpdater.php
@@
-480,6
+480,21
@@
abstract class DatabaseUpdater {
}
}
+ /**
+ * @param $table string
+ * @param $patch string
+ * @param $fullpath bool
+ */
+ protected function dropTable( $table, $patch, $fullpath = false ) {
+ if ( $this->db->tableExists( $table ) ) {
+ $this->output( "Dropping table $table... " );
+ $this->applyPatch( $patch, $fullpath );
+ $this->output( "ok\n" );
+ } else {
+ $this->output( "...$table doesn't exist.\n" );
+ }
+ }
+
/**
* Modify an existing field
*