Fix missing payment_methods table creation + bump CACHEBUST to v6

Migration AddedWithdrawalFrequency1733770884555 referenced payment_methods
table that was never created. Modified to CREATE TABLE IF NOT EXISTS with
all columns, then drop lightning_address from filmmakers.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Dorian
2026-02-13 19:47:46 +00:00
parent 34c48d9f6e
commit 4f7fdd4413
2 changed files with 22 additions and 10 deletions

View File

@@ -6,20 +6,32 @@ export class AddedWithdrawalFrequency1733770884555
name = 'AddedWithdrawalFrequency1733770884555'; name = 'AddedWithdrawalFrequency1733770884555';
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
// Create payment_methods table (missing migration)
await queryRunner.query(`
CREATE TABLE IF NOT EXISTS "payment_methods" (
"id" character varying NOT NULL,
"filmmaker_id" character varying NOT NULL,
"lightning_address" character varying,
"provider_id" character varying,
"type" character varying NOT NULL DEFAULT 'LIGHTNING',
"selected" boolean NOT NULL DEFAULT false,
"withdrawal_frequency" character varying NOT NULL DEFAULT 'automatic',
"created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
"deleted_at" TIMESTAMP WITH TIME ZONE,
CONSTRAINT "PK_payment_methods" PRIMARY KEY ("id"),
CONSTRAINT "FK_payment_methods_filmmaker" FOREIGN KEY ("filmmaker_id") REFERENCES "filmmakers"("id") ON DELETE NO ACTION ON UPDATE NO ACTION
)
`);
await queryRunner.query( await queryRunner.query(
`ALTER TABLE "filmmakers" DROP COLUMN "lightning_address"`, `ALTER TABLE "filmmakers" DROP COLUMN IF EXISTS "lightning_address"`,
);
await queryRunner.query(
`ALTER TABLE "payment_methods" ADD "withdrawal_frequency" character varying NOT NULL DEFAULT 'automatic'`,
); );
} }
public async down(queryRunner: QueryRunner): Promise<void> { public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`ALTER TABLE "payment_methods" DROP COLUMN "withdrawal_frequency"`,
);
await queryRunner.query( await queryRunner.query(
`ALTER TABLE "filmmakers" ADD "lightning_address" character varying`, `ALTER TABLE "filmmakers" ADD "lightning_address" character varying`,
); );
await queryRunner.query(`DROP TABLE IF EXISTS "payment_methods"`);
} }
} }

View File

@@ -20,7 +20,7 @@ services:
context: . context: .
dockerfile: Dockerfile dockerfile: Dockerfile
args: args:
CACHEBUST: "2" CACHEBUST: "6"
VITE_USE_MOCK_DATA: "false" VITE_USE_MOCK_DATA: "false"
VITE_CONTENT_ORIGIN: ${FRONTEND_URL} VITE_CONTENT_ORIGIN: ${FRONTEND_URL}
VITE_INDEEHUB_API_URL: /api VITE_INDEEHUB_API_URL: /api
@@ -47,7 +47,7 @@ services:
context: ./backend context: ./backend
dockerfile: Dockerfile dockerfile: Dockerfile
args: args:
CACHEBUST: "5" CACHEBUST: "6"
restart: unless-stopped restart: unless-stopped
environment: environment:
# ── Core ───────────────────────────────────────────── # ── Core ─────────────────────────────────────────────
@@ -179,7 +179,7 @@ services:
context: ./backend context: ./backend
dockerfile: Dockerfile.ffmpeg dockerfile: Dockerfile.ffmpeg
args: args:
CACHEBUST: "5" CACHEBUST: "6"
restart: unless-stopped restart: unless-stopped
environment: environment:
ENVIRONMENT: production ENVIRONMENT: production