You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
388 B

import {Unit, Singleton, MigrateDirective} from '@extollo/lib'
/**
* Apply migrations when the application starts up.
* This is way more convenient than `./ex migrate` for Kubernetes deployments.
*/
@Singleton()
export class MigrateUnit extends Unit {
async up() {
const directive = this.make<MigrateDirective>(MigrateDirective)
await directive.invoke([])
}
}