Bug 27424: (QA follow-up) Make db update idempotent

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Kyle Hall 2023-06-08 09:45:18 -04:00 committed by Tomas Cohen Arazi
parent b10b840577
commit f9002b96cd
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -6,6 +6,8 @@ return {
up => sub {
my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)};
$dbh->do(q{ALTER TABLE smtp_servers ADD COLUMN `is_default` tinyint(1) NOT NULL DEFAULT 0 AFTER debug});
unless ( column_exists( 'smtp_servers', 'is_default' ) ) {
$dbh->do(q{ALTER TABLE smtp_servers ADD COLUMN `is_default` tinyint(1) NOT NULL DEFAULT 0 AFTER debug});
}
},
};