hotfix: insert or update with postgres
This commit is contained in:
parent
1f5ddc05d2
commit
eb4db01b27
11 changed files with 43 additions and 32 deletions
|
@ -106,7 +106,7 @@ export class CreateSchema1738166167472 implements MigrationInterface {
|
|||
.insert()
|
||||
.into(templateUsage)
|
||||
.values([{ scope: "newsletter" }, { scope: "protocol" }, { scope: "member.list" }])
|
||||
.orUpdate(["headerId", "bodyId", "footerId", "headerHeight", "footerHeight"], ["scope"])
|
||||
.orIgnore()
|
||||
.execute();
|
||||
|
||||
await queryRunner.createTable(protocol_table, true, true, true);
|
||||
|
|
|
@ -11,7 +11,7 @@ export class TemplatesAndProtocolSort1742549956787 implements MigrationInterface
|
|||
.insert()
|
||||
.into(templateUsage)
|
||||
.values([{ scope: "member" }])
|
||||
.orUpdate(["headerId", "bodyId", "footerId", "headerHeight", "footerHeight"], ["scope"])
|
||||
.orIgnore()
|
||||
.execute();
|
||||
|
||||
await queryRunner.manager
|
||||
|
@ -47,7 +47,7 @@ export class TemplatesAndProtocolSort1742549956787 implements MigrationInterface
|
|||
.insert()
|
||||
.into(templateUsage)
|
||||
.values([{ scope: "member.list" }])
|
||||
.orUpdate(["headerId", "bodyId", "footerId", "headerHeight", "footerHeight"], ["scope"])
|
||||
.orIgnore()
|
||||
.execute();
|
||||
|
||||
await queryRunner.manager.createQueryBuilder().delete().from(templateUsage).where({ scope: "member" }).execute();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue