Run a set of migrations.
This works well with DECONF_MIGRATIONS
.
NOTE: all migrations must have a unique name, this is so previous migrations are not re-run.
// Run the deconf migrations
await migrateService.runMigrations(DECONF_MIGRATIONS)
// Run custom migrations
await migrateService.runMigrations([
{
id: 'add-custom-table',
async run(client) {
await client.sql`CREATE TABLE ...`
},
},
])
Generated using TypeDoc
MigrateService setups up and runs migrations for you.