Skip to content
Permalink
Browse files

Removing AFTER in Postgres add column.

It causes SQL errors on Postgres 8.4
  • Loading branch information...
markstory committed Sep 17, 2011
1 parent 707c0b4 commit 77b3e63293724a0e3d0f5c1bef558c4ca9cd9fb3
Showing with 1 addition and 5 deletions.
  1. +1 −5 cake/libs/model/datasources/dbo/dbo_postgres.php
@@ -580,11 +580,7 @@ function alterSchema($compare, $table = null) {
case 'add':
foreach ($column as $field => $col) {
$col['name'] = $field;
$alter = 'ADD COLUMN '.$this->buildColumn($col);
if (isset($col['after'])) {
$alter .= ' AFTER '. $this->name($col['after']);
}
$colList[] = $alter;
$colList[] = 'ADD COLUMN '.$this->buildColumn($col);
}
break;
case 'drop':

0 comments on commit 77b3e63

Please sign in to comment.
You can’t perform that action at this time.