mirror of
https://github.com/plankanban/planka.git
synced 2025-07-18 20:59:44 +02:00
feat: Alway apply migrations on start-up (#172)
This commit is contained in:
parent
938ced9721
commit
ce21925a70
1 changed files with 1 additions and 1 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue