Commit graph

27 commits

Author SHA1 Message Date
Chad Horohoe
42242d7620 Followup r81534, use addQuotes() instead 2011-02-23 16:42:42 +00:00
Chad Horohoe
62679f963e Various Postgres fixes (bug 26612 stuff)
* Remove last of $wgDBuser-specific settings like timezone, datestyle and search_path. This is all handled by open() :D
* Only set search_path if the schema exists (rather than just set to some random string), fall back to 'public' otherwise
* Only call setupUser() if we need to _CreateDBAccount, otherwise it returns immediately and confuses you (no functional change)
* Implement selectDB() for Postgres, basically call open() with a new DB name
* Try to fix setupDatabase() for this "user must be owner of relation" error I'm getting when the $wgDBuser exists (have tried with roles granted && no roles granted). I get no errors at all when
2011-02-23 16:01:22 +00:00
Mark A. Hershberger
56a62b9c7b These table renames aren't needed for an upgrade since Pg has these as reserved names anyway. 2011-02-04 21:44:24 +00:00
Mark A. Hershberger
bc73fdc28d change from double quote to single quote to avoid double-encoding by htmlspecialchars() 2011-02-04 20:05:05 +00:00
Chad Horohoe
69d2ee1095 Followup r81132, missed some more ts2 removal 2011-01-28 15:25:15 +00:00
Greg Sabino Mullane
c4a15c727c Don't put multiple tables in the same file. 2010-12-30 18:53:48 +00:00
Chad Horohoe
a854a0efbe * Followup r78450: just use selectField() instead of pg_fetch_result() with a raw doQuery()
* Remove useless isset() check, this will always be set with some default in DefaultSettings.php
2010-12-27 13:56:20 +00:00
Aaron Schulz
281018701f Changed doQuery() -> query() 2010-12-15 20:59:29 +00:00
Chad Horohoe
793d1e9fba rm double comment 2010-12-14 12:47:37 +00:00
Mark A. Hershberger
962be1d210 * Commit changes to PG new-installer I thought I had done last week.
* Set up and use function for renaming tables
* Use $conn instead of $this when it is called for
* remove protection from commitChanges so the installer can use it
2010-12-01 20:15:45 +00:00
Max Semenik
4345c2c20e Refactoring of *Field classes:
* Made them all implement one common interface (might add more functions to it later)
* Moved MySQLField to DatabaseMysql.php
* Renamed nullable() to isNullable()
* Removed maxLength() from:
** SQLiteField: makes no sense
** MySQLField: doesn't do what people may think, useless for this class' purpose of assisting querying the DB schema
2010-11-21 19:56:51 +00:00
Sam Reed
a4cebd898a Another followup to r71426, $ni to $fieldRecord 2010-10-14 20:34:01 +00:00
Sam Reed
9b19417e6c Followup r71426, not $nc it's $fieldRecord 2010-10-14 20:31:34 +00:00
Sam Reed
a2589ff8c6 Assignment in loop conditions suck
while ( $row = $dbw->fetchObject( $res ) ) { to foreach ( $res as $row ) in includes

Add some braces
2010-10-13 23:11:40 +00:00
Chad Horohoe
ec9eddf74b wfOut() -> $this->output(). More useful in the long run. No functional changes. 2010-10-01 15:11:06 +00:00
Greg Sabino Mullane
cb1c5fd26b Add new index on pagelinkes(pl_title) per suggestion from bug 25111 2010-09-13 15:04:04 +00:00
Greg Sabino Mullane
84a28b19b7 Add the "page" table back in when upgrading from really old MW versions using Postgres 2010-09-13 14:26:38 +00:00
Greg Sabino Mullane
7fb452c2a7 Add new columns to categorylinks 2010-09-08 17:51:42 +00:00
OverlordQ
b7c0058a7e Followup to r72349, PG table def + updater for module_deps 2010-09-04 04:14:51 +00:00
OverlordQ
d97bb6f129 Followup to r72349, PG tables + updater 2010-09-04 04:10:23 +00:00
Chad Horohoe
21216bd52d Deprecate archive() in favor of DatabaseBase::patchPath() 2010-09-01 18:52:06 +00:00
Alexandre Emsenhuber
c815ad8696 Oops, forgot to change this in r71426 2010-08-22 08:32:29 +00:00
Alexandre Emsenhuber
6a98ded353 Moved PostgreSQL schema update to PostgresUpdater:
* Still not doing sequential updates, but now this should be easier to correct
* Corrected addition of page_restrictions.pr_id field to use the correct sequence name
* Had to change DatabaseUpdater::getOldGlobalUpdates() from private to protected, since PostgreSQL has its own globals for extensions
* Moved do_all_updates() and archive() to the top of updaters.inc so that they are easier to find
2010-08-22 08:07:26 +00:00
Alexandre Emsenhuber
ca6b4a72a5 Fix for r71140: PostgresUpdater should extend DatabaseUpdater, not Updater 2010-08-21 20:23:42 +00:00
Alexandre Emsenhuber
b8cafd4978 * Added file description headers
* Added @file where needed
2010-08-21 18:20:09 +00:00
Alexandre Emsenhuber
420424acf7 @TODO @FIXME -> @todo so that doxygen recognise it correctly 2010-08-21 15:53:46 +00:00
Chad Horohoe
f08c6b1df9 Initial refactoring for Postgres; DatabaseUpdater subclass is now passed to LoadExtensionSchemaUpdates 2010-08-15 18:55:08 +00:00