diff --git a/src/migrations/1749296280721-CreateSchema.ts b/src/migrations/1749296280721-CreateSchema.ts index 168810a..638455c 100644 --- a/src/migrations/1749296280721-CreateSchema.ts +++ b/src/migrations/1749296280721-CreateSchema.ts @@ -49,6 +49,7 @@ import { protocol_printout_table, } from "./baseSchemaTables/protocol"; import { query_table, template_table, template_usage_table } from "./baseSchemaTables/query_template"; +import { availableTemplates } from "../type/templateTypes"; export class CreateSchema1749296280721 implements MigrationInterface { name = "CreateSchema1749296280721"; @@ -95,13 +96,11 @@ export class CreateSchema1749296280721 implements MigrationInterface { .createQueryBuilder() .insert() .into(template_usage_table.name) - .values([ - { scope: "newsletter" }, - { scope: "protocol" }, - { scope: "member" }, - { scope: "listprint" }, - { scope: "listprint.member" }, - ]) + .values( + availableTemplates.map((at) => ({ + scope: at, + })) + ) .orIgnore() .execute();