Bug 31673: (QA follow-up) Check if FK exists before attempt to remove
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1c83bd0638)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
43cd28d4e8
commit
4c8ffab563
|
|
@ -32,9 +32,12 @@ return {
|
|||
});
|
||||
|
||||
# Remove FOREIGN KEY CONSTRAINT
|
||||
$dbh->do(q{
|
||||
ALTER TABLE reserves DROP FOREIGN KEY reserves_ibfk_4;
|
||||
});
|
||||
if ( foreign_key_exists( 'reserves', 'reserves_ibfk_4' ) ) {
|
||||
$dbh->do(q{
|
||||
ALTER TABLE reserves DROP FOREIGN KEY reserves_ibfk_4;
|
||||
});
|
||||
}
|
||||
|
||||
# Set the NOT NULL configuration
|
||||
$dbh->do(q{
|
||||
ALTER TABLE reserves
|
||||
|
|
|
|||
Loading…
Reference in New Issue