This commit is contained in:
ricardo
2020-05-27 19:32:49 -04:00
parent f9db4bb501
commit 91c40367e1
19 changed files with 423 additions and 54 deletions

View File

@@ -27,10 +27,12 @@ export let collections: IDatabaseCollections = {
Credentials: null,
Execution: null,
Workflow: null,
Webhook: null,
};
import {
InitialMigration1587669153312
InitialMigration1587669153312,
WebhookModel1589476000887,
} from './databases/postgresdb/migrations';
import {
@@ -81,7 +83,7 @@ export async function init(): Promise<IDatabaseCollections> {
port: await GenericHelpers.getConfigValue('database.postgresdb.port') as number,
username: await GenericHelpers.getConfigValue('database.postgresdb.user') as string,
schema: config.get('database.postgresdb.schema'),
migrations: [InitialMigration1587669153312],
migrations: [InitialMigration1587669153312, WebhookModel1589476000887],
migrationsRun: true,
migrationsTableName: `${entityPrefix}migrations`,
};
@@ -135,6 +137,7 @@ export async function init(): Promise<IDatabaseCollections> {
collections.Credentials = getRepository(entities.CredentialsEntity);
collections.Execution = getRepository(entities.ExecutionEntity);
collections.Workflow = getRepository(entities.WorkflowEntity);
collections.Webhook = getRepository(entities.WebhookEntity);
return collections;
}