32MXC7NNZKN5KFZNMS6J22LHLL4WQJFKTWHBKAJVDM6NBORIKAEAC
$dbh->{Driver}->{Name} eq 'SQLite' ? "$home/sql/hydra-sqlite.sql" :
$dbh->{Driver}->{Name} eq 'Pg' ? "$home/sql/hydra-postgresql.sql" :
die "unsupported database type\n");
$dbh->{Driver}->{Name} eq 'SQLite' ? "$home/sql/hydra-sqlite.sql" :
$dbh->{Driver}->{Name} eq 'Pg' ? "$home/sql/hydra-postgresql.sql" :
die "unsupported database type\n");
$dbh->begin_work;
$dbh->do($_) foreach @statements;
$db->resultset('SchemaVersion')->create({version => $maxSchemaVersion});
$dbh->commit;
$dbh->begin_work;
$dbh->do($_) foreach @statements;
$db->resultset('SchemaVersion')->create({version => $maxSchemaVersion});
$dbh->commit;
$dbh->begin_work;
$dbh->do($_) foreach @statements;
$db->resultset('SchemaVersion')->update({version => $m});
$dbh->commit;
$dbh->begin_work;
sub run {
my ($stm) = @_;
print STDERR "executing SQL statement: $stm\n";
$dbh->do($_);
}
run($_) foreach @statements;
$db->resultset('SchemaVersion')->update({version => $m});
$dbh->commit;