mirror of
https://github.com/plankanban/planka.git
synced 2025-07-18 20:59:44 +02:00
Docker, update readme, update dependencies
This commit is contained in:
parent
2398199740
commit
adbcb67f03
30 changed files with 1202 additions and 1744 deletions
19
server/db/init.js
Normal file
19
server/db/init.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
const config = require('./knexfile');
|
||||
const knex = require('knex')(config);
|
||||
|
||||
(async function () {
|
||||
try {
|
||||
const exists = await knex.schema.hasTable(config.migrations.tableName);
|
||||
|
||||
if (!exists) {
|
||||
await knex.migrate.latest();
|
||||
await knex.seed.run();
|
||||
}
|
||||
} catch (error) {
|
||||
process.exitCode = 1;
|
||||
|
||||
throw error;
|
||||
} finally {
|
||||
knex.destroy();
|
||||
}
|
||||
})();
|
Loading…
Add table
Add a link
Reference in a new issue