better insert template usage scopes
This commit is contained in:
parent
874b863b1e
commit
feb03ba99d
1 changed files with 6 additions and 7 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue