aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2017-09-05 08:01:23 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2017-09-05 08:01:23 +0200
commit6e7a458aa459d35332f1a807449ef12ff3cb794f (patch)
treef8dde35fc097509dfdfbce30438aeb988cdccdc4
parentad49e0b657bbfcfbe44118ec33f1b93551906ce7 (diff)
downloadsavane-gray-6e7a458aa459d35332f1a807449ef12ff3cb794f.tar.gz
savane-gray-6e7a458aa459d35332f1a807449ef12ff3cb794f.tar.bz2
Minor fix
-rwxr-xr-xupdate/mkdbmig4
1 files changed, 3 insertions, 1 deletions
diff --git a/update/mkdbmig b/update/mkdbmig
index 7cc9682..7f5cae5 100755
--- a/update/mkdbmig
+++ b/update/mkdbmig
@@ -85,7 +85,9 @@ sub alter_table {
print "CHANGE COLUMN $line->{name} ";
print "$line->{name} $addlines[$i]->{defn}";
splice @addlines, $i, 1;
- } elsif ($line->{obj} eq 'KEY' && $line->{qual} eq 'PRIMARY') {
+ } elsif ($line->{obj} eq 'KEY'
+ && defined($line->{qual})
+ && $line->{qual} eq 'PRIMARY') {
print "DROP PRIMARY KEY\n";
} else {
print "DROP $line->{obj} $line->{name}";

Return to:

Send suggestions and report system problems to the System administrator.