Skip to content

Commit

Permalink
fix: migrations for obiz_id error in offer_articles
Browse files Browse the repository at this point in the history
  • Loading branch information
HoreKk committed Dec 3, 2024
1 parent ee48d8e commit 65c8dc9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 1 addition & 2 deletions webapp/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
## [0.73.12](https://github.com/SocialGouv/carte-jeune-engage/compare/v0.73.11...v0.73.12) (2024-12-03)


### Bug Fixes

* layout header in obiz offer journey ([ddf4b98](https://github.com/SocialGouv/carte-jeune-engage/commit/ddf4b981de602d6d81b6f82b24492d73355533a1))
- layout header in obiz offer journey ([ddf4b98](https://github.com/SocialGouv/carte-jeune-engage/commit/ddf4b981de602d6d81b6f82b24492d73355533a1))

## [0.73.11](https://github.com/SocialGouv/carte-jeune-engage/compare/v0.73.10...v0.73.11) (2024-12-03)

Expand Down
6 changes: 6 additions & 0 deletions webapp/src/payload/migrations/20241202_083807.json
Original file line number Diff line number Diff line change
Expand Up @@ -1506,6 +1506,12 @@
"primaryKey": true,
"notNull": true
},
"obiz_id": {
"name": "obiz_id",
"type": "varchar",
"primaryKey": false,
"notNull": false
},
"available": {
"name": "available",
"type": "boolean",
Expand Down
4 changes: 1 addition & 3 deletions webapp/src/payload/migrations/20241203_093746.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ CREATE TABLE IF NOT EXISTS "couponsignals_rels" (
"coupons_id" integer
);
ALTER TABLE "offers_articles" ADD COLUMN "obiz_id" varchar;
CREATE INDEX IF NOT EXISTS "couponsignals_created_at_idx" ON "couponsignals" ("created_at");
CREATE INDEX IF NOT EXISTS "couponsignals_rels_order_idx" ON "couponsignals_rels" ("order");
CREATE INDEX IF NOT EXISTS "couponsignals_rels_parent_idx" ON "couponsignals_rels" ("parent_id");
Expand All @@ -43,7 +42,6 @@ export async function down({ payload }: MigrateDownArgs): Promise<void> {
await payload.db.drizzle.execute(sql`
DROP TABLE "couponsignals";
DROP TABLE "couponsignals_rels";
ALTER TABLE "offers_articles" DROP COLUMN IF EXISTS "obiz_id";`);
DROP TABLE "couponsignals_rels";`);

};

0 comments on commit 65c8dc9

Please sign in to comment.