From aeabd79ac660c7230ad41bde24e8f19e2ae5c0db Mon Sep 17 00:00:00 2001 From: ordinarthur <@arthurbarre.js@gmail.com> Date: Tue, 21 Apr 2026 11:02:19 +0200 Subject: [PATCH] fix: regenerate migration with stripe plugin fields Previous run generated the initial migration without STRIPE_SECRET_KEY set, so the stripe plugin's sync was disabled and the stripeID/skipSync columns were omitted. Prod then crashed on queries referencing products.stripe_i_d. Regenerated with a placeholder key so the plugin contributes its fields to the schema. Co-Authored-By: Claude Opus 4.7 --- ...tial.json => 20260421_085445_initial.json} | 26 ++++++++++++++++++- ..._initial.ts => 20260421_085445_initial.ts} | 4 +++ nextjs/src/migrations/index.ts | 8 +++--- 3 files changed, 33 insertions(+), 5 deletions(-) rename nextjs/src/migrations/{20260421_083912_initial.json => 20260421_085445_initial.json} (98%) rename nextjs/src/migrations/{20260421_083912_initial.ts => 20260421_085445_initial.ts} (99%) diff --git a/nextjs/src/migrations/20260421_083912_initial.json b/nextjs/src/migrations/20260421_085445_initial.json similarity index 98% rename from nextjs/src/migrations/20260421_083912_initial.json rename to nextjs/src/migrations/20260421_085445_initial.json index 8f44884..7f71bdc 100644 --- a/nextjs/src/migrations/20260421_083912_initial.json +++ b/nextjs/src/migrations/20260421_085445_initial.json @@ -751,6 +751,18 @@ "primaryKey": false, "notNull": false }, + "stripe_i_d": { + "name": "stripe_i_d", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "skip_sync": { + "name": "skip_sync", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, "updated_at": { "name": "updated_at", "type": "timestamp(3) with time zone", @@ -1096,6 +1108,18 @@ "primaryKey": false, "notNull": false }, + "version_stripe_i_d": { + "name": "version_stripe_i_d", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_skip_sync": { + "name": "version_skip_sync", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, "version_updated_at": { "name": "version_updated_at", "type": "timestamp(3) with time zone", @@ -2161,6 +2185,6 @@ "tables": {}, "columns": {} }, - "id": "013dbcb1-4b0a-4d16-8ae7-0477d7cc3b27", + "id": "6fac7636-258c-41c3-b39c-8216bf89895b", "prevId": "00000000-0000-0000-0000-000000000000" } \ No newline at end of file diff --git a/nextjs/src/migrations/20260421_083912_initial.ts b/nextjs/src/migrations/20260421_085445_initial.ts similarity index 99% rename from nextjs/src/migrations/20260421_083912_initial.ts rename to nextjs/src/migrations/20260421_085445_initial.ts index ae7c7ad..6a17475 100644 --- a/nextjs/src/migrations/20260421_083912_initial.ts +++ b/nextjs/src/migrations/20260421_085445_initial.ts @@ -92,6 +92,8 @@ export async function up({ db, payload, req }: MigrateUpArgs): Promise { "stripe_product_i_d" varchar, "seo_title" varchar, "seo_description" varchar, + "stripe_i_d" varchar, + "skip_sync" boolean, "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL, "_status" "enum_products_status" DEFAULT 'draft' @@ -127,6 +129,8 @@ export async function up({ db, payload, req }: MigrateUpArgs): Promise { "version_stripe_product_i_d" varchar, "version_seo_title" varchar, "version_seo_description" varchar, + "version_stripe_i_d" varchar, + "version_skip_sync" boolean, "version_updated_at" timestamp(3) with time zone, "version_created_at" timestamp(3) with time zone, "version__status" "enum__products_v_version_status" DEFAULT 'draft', diff --git a/nextjs/src/migrations/index.ts b/nextjs/src/migrations/index.ts index 3a24e9c..35fd715 100644 --- a/nextjs/src/migrations/index.ts +++ b/nextjs/src/migrations/index.ts @@ -1,9 +1,9 @@ -import * as migration_20260421_083912_initial from './20260421_083912_initial'; +import * as migration_20260421_085445_initial from './20260421_085445_initial'; export const migrations = [ { - up: migration_20260421_083912_initial.up, - down: migration_20260421_083912_initial.down, - name: '20260421_083912_initial' + up: migration_20260421_085445_initial.up, + down: migration_20260421_085445_initial.down, + name: '20260421_085445_initial' }, ];