fix(backend-tasks): Allow it to skip migrations
Signed-off-by: Daniel Dias Branco Arthaud <arthaud@gmail.com>
This commit is contained in:
@@ -58,9 +58,12 @@ export class TaskScheduler {
|
||||
*/
|
||||
forPlugin(pluginId: string): PluginTaskScheduler {
|
||||
const databaseFactory = once(async () => {
|
||||
const knex = await this.databaseManager.forPlugin(pluginId).getClient();
|
||||
const databaseManager = this.databaseManager.forPlugin(pluginId);
|
||||
const knex = await databaseManager.getClient();
|
||||
|
||||
await migrateBackendTasks(knex);
|
||||
if (!databaseManager.migrations?.skip) {
|
||||
await migrateBackendTasks(knex);
|
||||
}
|
||||
|
||||
const janitor = new PluginTaskSchedulerJanitor({
|
||||
knex,
|
||||
|
||||
Reference in New Issue
Block a user