2025-05-10 02:09:06 +02:00
|
|
|
/*!
|
|
|
|
* Copyright (c) 2024 PLANKA Software GmbH
|
|
|
|
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
|
|
|
|
*/
|
|
|
|
|
2022-06-20 18:27:39 +02:00
|
|
|
const initKnex = require('knex');
|
2019-10-01 04:18:33 +05:00
|
|
|
|
2022-06-20 18:27:39 +02:00
|
|
|
const knexfile = require('./knexfile');
|
|
|
|
|
|
|
|
const knex = initKnex(knexfile);
|
2019-11-05 18:01:42 +05:00
|
|
|
|
|
|
|
(async () => {
|
2019-10-01 04:18:33 +05:00
|
|
|
try {
|
2022-04-20 00:52:42 +01:00
|
|
|
await knex.migrate.latest();
|
2023-09-12 01:12:38 +02:00
|
|
|
await knex.seed.run();
|
2019-10-01 04:18:33 +05:00
|
|
|
} catch (error) {
|
|
|
|
process.exitCode = 1;
|
|
|
|
throw error;
|
|
|
|
} finally {
|
|
|
|
knex.destroy();
|
|
|
|
}
|
|
|
|
})();
|