-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: raphaelblum <44967610+raphaelblum@users.noreply.github.com>
- Loading branch information
1 parent
31db55b
commit c20792a
Showing
4 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"@comet/brevo-api": patch | ||
--- | ||
|
||
Remove `scope` from `BrevoConfig` database migration in module | ||
|
||
A custom database migration must be created in the project to add individual `scope` columns to `BrevoConfig`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { Migration } from "@mikro-orm/migrations"; | ||
|
||
export class Migration20250221074620 extends Migration { | ||
// this migration needs to be generated manually | ||
async up(): Promise<void> { | ||
this.addSql( | ||
`alter table "BrevoConfig" add column "scope_domain" text not null default 'main', add column "scope_language" text not null default 'en';`, | ||
); | ||
this.addSql(`alter table "BrevoConfig" alter column "scope_domain" drop default, alter column "scope_language" drop default;`); | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
packages/api/src/mikro-orm/migrations/Migration20250221073825.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { Migration } from "@mikro-orm/migrations"; | ||
|
||
export class Migration20250221073825 extends Migration { | ||
async up(): Promise<void> { | ||
this.addSql('alter table "BrevoConfig" drop column "scope_domain", drop column "scope_language";'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters