Skip to content

Commit

Permalink
Alter table - postgresql compat - removed backticks
Browse files Browse the repository at this point in the history
  • Loading branch information
ophian committed Nov 8, 2013
1 parent e2827c6 commit 3845c0b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ function checkScheme() {
$version = $this->get_config('dbversion', '0');

if ($version == '2.0') {
$q = "ALTER TABLE {$serendipity['dbPrefix']}karmalog CHANGE COLUMN `ip` `ip` VARCHAR(45)";
$q = "ALTER TABLE {$serendipity['dbPrefix']}karmalog CHANGE COLUMN ip ip VARCHAR(45)";
$sql = serendipity_db_schema_import($q);
$this->set_config('dbversion', PLUGIN_KARMA_DB_VERSION);
} elseif ($version == '1.1') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -736,10 +736,10 @@ function checkScheme() {
}

if ($dbversion == '2') {
$q = "ALTER TABLE {$serendipity['dbPrefix']}spamblocklog CHANGE COLUMN `ip` `ip` VARCHAR(45)";
$q = "ALTER TABLE {$serendipity['dbPrefix']}spamblocklog CHANGE COLUMN ip ip VARCHAR(45)";
$sql = serendipity_db_schema_import($q);

$q = "ALTER TABLE {$serendipity['dbPrefix']}spamblock_htaccess CHANGE COLUMN `ip` `ip` VARCHAR(45)";
$q = "ALTER TABLE {$serendipity['dbPrefix']}spamblock_htaccess CHANGE COLUMN ip ip VARCHAR(45)";
$sql = serendipity_db_schema_import($q);

$this->set_config('dbversion', '3');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,7 @@ function updateTables($dbic=0) {
}

if ($dbic == 1) {
$q = "ALTER TABLE {$serendipity['dbPrefix']}visitors CHANGE COLUMN `ip` `ip` VARCHAR(45)";
$q = "ALTER TABLE {$serendipity['dbPrefix']}visitors CHANGE COLUMN ip ip VARCHAR(45)";
serendipity_db_schema_import($q);

$this->set_config('db_indices_created', '2');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function generate_content(&$title)
$this->set_config('version', '1.0');
}
if ($this->get_config('version') == '1.0') {
$q = "ALTER TABLE {$serendipity['dbPrefix']}shoutbox CHANGE COLUMN `ip` `ip` VARCHAR(45)";
$q = "ALTER TABLE {$serendipity['dbPrefix']}shoutbox CHANGE COLUMN ip ip VARCHAR(45)";
$sql = serendipity_db_schema_import($q);
$this->set_config('version', '2');
}
Expand Down

0 comments on commit 3845c0b

Please sign in to comment.