1
0
Fork 0
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:
Maksim Eltyshev 2019-10-01 04:18:33 +05:00
parent 2398199740
commit adbcb67f03
30 changed files with 1202 additions and 1744 deletions

19
server/db/init.js Normal file
View 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();
}
})();