*** empty log message ***
This commit is contained in:
parent
7275c3a7bf
commit
7472c8a866
1 changed files with 5 additions and 4 deletions
|
@ -716,10 +716,11 @@ foreach $table ( keys %fielddefinitions ) {
|
||||||
$extra = '';
|
$extra = '';
|
||||||
}
|
}
|
||||||
# if it's a primary key, drop the previous pk, before altering the table
|
# if it's a primary key, drop the previous pk, before altering the table
|
||||||
|
my $sth;
|
||||||
if ($key eq 'PRI') {
|
if ($key eq 'PRI') {
|
||||||
my $sth =$dbh->prepare("alter table $table change $field $field $type $null $key $extra default ?");
|
$sth =$dbh->prepare("alter table $table change $field $field $type $null $key $extra default ?");
|
||||||
} else {
|
} else {
|
||||||
my $sth =$dbh->prepare("alter table $table drop primary key, change $field $field $type $null $key $extra default ?");
|
$sth =$dbh->prepare("alter table $table drop primary key, change $field $field $type $null $key $extra default ?");
|
||||||
}
|
}
|
||||||
$sth->execute($default);
|
$sth->execute($default);
|
||||||
print " Alter $field in $table\n";
|
print " Alter $field in $table\n";
|
||||||
|
@ -868,8 +869,8 @@ $sth->finish;
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
# $Log$
|
# $Log$
|
||||||
# Revision 1.55 2003/07/07 15:36:13 tipaul
|
# Revision 1.56 2003/07/07 15:37:20 tipaul
|
||||||
# (again) fix to avoid errors when creating fields that are primary keys and a previous primary key exist.
|
# *** empty log message ***
|
||||||
#
|
#
|
||||||
# Revision 1.53 2003/07/07 14:11:16 tipaul
|
# Revision 1.53 2003/07/07 14:11:16 tipaul
|
||||||
# fixing bug #526 : gst rate is now calculated through systempref gist entry.
|
# fixing bug #526 : gst rate is now calculated through systempref gist entry.
|
||||||
|
|
Loading…
Reference in a new issue