import { kysely } from "https://dotland.deno.dev/x/kysely_postgrs_js_dialect@v0.27.3/deps.ts";
const { Migrator } = kysely;
Migrate up/down to a specific migration.
This method returns a MigrationResultSet instance and never throws. {@link MigrationResultSet.error} holds the error if something went wrong. {@link MigrationResultSet.results} contains information about which migrations were executed and which failed.
Examples
await migrator.migrateTo('some_migration')
If you specify the name of the first migration, this method migrates
down to the first migration, but doesn't run the down
method of
the first migration. In case you want to migrate all the way down,
you can use a special constant NO_MIGRATIONS
:
await migrator.migrateTo(NO_MIGRATIONS)
Parameters
targetMigrationName: string | NoMigrations
Returns
Promise<MigrationResultSet>