Initial pass at migrations

This commit is contained in:
Owen Schwartz 2024-12-25 15:49:35 -05:00
parent 29bd88ebdf
commit 2a265e5cdd
No known key found for this signature in database
GPG key ID: 8271FDFFD9E0CCBD
9 changed files with 191 additions and 26 deletions

View file

@ -1,7 +1,11 @@
import { ensureActions } from "./ensureActions";
import { copyInConfig } from "./copyInConfig";
import logger from "@server/logger";
import { runMigrations } from "./migrations";
export async function runSetupFunctions() {
logger.info(`Setup for version ${process.env.APP_VERSION}`);
await runMigrations(); // run the migrations
await ensureActions(); // make sure all of the actions are in the db and the roles
await copyInConfig(); // copy in the config to the db as needed
}