mirror of
https://github.com/plankanban/planka.git
synced 2025-12-18 17:23:21 +03:00
feat: Alway apply migrations on start-up (#172)
This commit is contained in:
committed by
GitHub
parent
16a822cc7d
commit
5049034ae3
@@ -6,8 +6,8 @@ const knex = require('knex')(config); // eslint-disable-line import/order
|
|||||||
try {
|
try {
|
||||||
const isExists = await knex.schema.hasTable(config.migrations.tableName);
|
const isExists = await knex.schema.hasTable(config.migrations.tableName);
|
||||||
|
|
||||||
|
await knex.migrate.latest();
|
||||||
if (!isExists) {
|
if (!isExists) {
|
||||||
await knex.migrate.latest();
|
|
||||||
await knex.seed.run();
|
await knex.seed.run();
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user