projects
/
DBIx-DBSchema.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
0f550d6
)
Add IF EXISTS to DROP INDEX (except under MySQL)
author
Ivan Kohler
<ivan@freeside.biz>
Thu, 4 Feb 2016 00:42:12 +0000
(16:42 -0800)
committer
Ivan Kohler
<ivan@freeside.biz>
Thu, 4 Feb 2016 00:42:12 +0000
(16:42 -0800)
DBSchema/Table.pm
patch
|
blob
|
history
diff --git
a/DBSchema/Table.pm
b/DBSchema/Table.pm
index
aec605f
..
081841a
100644
(file)
--- a/
DBSchema/Table.pm
+++ b/
DBSchema/Table.pm
@@
-631,7
+631,7
@@
sub sql_alter_table {
warn "removing obsolete index $table.$old ON ( ".
$old_indices{$old}->columns_sql. " )\n"
if $DEBUG > 1;
- push @r,
"
DROP INDEX '.
+ push @r,
'
DROP INDEX '.
( $driver ne 'mysql' ? ' IF EXISTS ' : '');
" $old ".
( $driver eq 'mysql' ? " ON $table " : '');