Bug 35906: (QA follow-up) Remove use of IF NOT EXISTS
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
86060310d4
commit
adfd70b1be
|
|
@ -8,13 +8,15 @@ return {
|
|||
my ($args) = @_;
|
||||
my ( $dbh, $out ) = @$args{qw(dbh out)};
|
||||
|
||||
$dbh->do(
|
||||
q{
|
||||
ALTER TABLE itemtypes ADD IF NOT EXISTS bookable INT(1) DEFAULT 0 AFTER automatic_checkin
|
||||
}
|
||||
);
|
||||
if ( !column_exists( 'itemtypes', 'bookable' ) ) {
|
||||
$dbh->do(
|
||||
q{
|
||||
ALTER TABLE itemtypes ADD COLUMN bookable INT(1) DEFAULT 0 AFTER automatic_checkin
|
||||
}
|
||||
);
|
||||
|
||||
say_success( $out, "Added column 'itemtypes.bookable'" );
|
||||
say_success( $out, "Added column 'itemtypes.bookable'" );
|
||||
}
|
||||
|
||||
$dbh->do(
|
||||
q{
|
||||
|
|
|
|||
Loading…
Reference in New Issue