migrate.pl: ignore dbix_migration table

This commit is contained in:
Lucas 2023-03-05 19:57:20 +00:00
parent 6dfabdf29f
commit db26c5fcc9

View File

@ -9,14 +9,14 @@ use Mojo::File qw(curfile);
my $parent = curfile->dirname;
my $dsn = "dbi:SQLite:" . $parent->sibling("db", "PoorBooru.db")->to_string;
my %opts = (
dump_directory => $parent->sibling("lib")->to_string,
exclude => qr/^dbix_migration$/,
);
DBIx::Migration->new({
dsn => $dsn,
dir => $parent->sibling("migrations")->to_string,
})->migrate or die "couldn't run migration";
make_schema_at(
"PoorBooru::Schema",
{ dump_directory => $parent->sibling("lib")->to_string },
[ $dsn ],
);
make_schema_at("PoorBooru::Schema", \%opts, [$dsn]);