projects
/
DBIx-DBSchema.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
consolidate multiple ALTER TABLE statements for efficiency
[DBIx-DBSchema.git]
/
DBSchema
/
DBD
/
Pg.pm
diff --git
a/DBSchema/DBD/Pg.pm
b/DBSchema/DBD/Pg.pm
index
b54f1d1
..
c441633
100644
(file)
--- a/
DBSchema/DBD/Pg.pm
+++ b/
DBSchema/DBD/Pg.pm
@@
-270,7
+270,7
@@
sub alter_column_callback {
if ( $pg_server_version >= 80000 ) {
$hashref->{'sql_alter_type'} =
if ( $pg_server_version >= 80000 ) {
$hashref->{'sql_alter_type'} =
- "ALTER
TABLE $table ALTER
COLUMN ". $new_column->name.
+ "ALTER COLUMN ". $new_column->name.
" TYPE ". $new_column->type.
( ( defined($new_column->length) && $new_column->length )
? '('.$new_column->length.')'
" TYPE ". $new_column->type.
( ( defined($new_column->length) && $new_column->length )
? '('.$new_column->length.')'