From 0ebf40285defd990a7072e2f9140dc7cf72b4d67 Mon Sep 17 00:00:00 2001 From: Pierre <63404022+0-Pierre@users.noreply.github.com> Date: Fri, 28 Mar 2025 18:13:36 +0100 Subject: [PATCH] fix: allow null values for caaUrl to prevent SQLITE_CONSTRAINT: NOT NULL constraint failure in metadata_album.caaUrl --- server/migration/postgres/1714310036946-AddMusicSupport.ts | 2 +- server/migration/sqlite/1714310036946-AddMusicSupport.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/migration/postgres/1714310036946-AddMusicSupport.ts b/server/migration/postgres/1714310036946-AddMusicSupport.ts index cc1e1343..e5e1544b 100644 --- a/server/migration/postgres/1714310036946-AddMusicSupport.ts +++ b/server/migration/postgres/1714310036946-AddMusicSupport.ts @@ -59,7 +59,7 @@ export class AddMusicSupport1714310036946 implements MigrationInterface { `CREATE TABLE "metadata_album" ( "id" SERIAL NOT NULL, "mbAlbumId" character varying NOT NULL, - "caaUrl" character varying NOT NULL, + "caaUrl" character varying NULL, "createdAt" TIMESTAMP NOT NULL DEFAULT now(), "updatedAt" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "PK_metadata_album" PRIMARY KEY ("id") diff --git a/server/migration/sqlite/1714310036946-AddMusicSupport.ts b/server/migration/sqlite/1714310036946-AddMusicSupport.ts index d9681cc0..589e5a84 100644 --- a/server/migration/sqlite/1714310036946-AddMusicSupport.ts +++ b/server/migration/sqlite/1714310036946-AddMusicSupport.ts @@ -116,7 +116,7 @@ export class AddMusicSupport1714310036946 implements MigrationInterface { `CREATE TABLE "metadata_album" ( "id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "mbAlbumId" varchar NOT NULL, - "caaUrl" varchar NOT NULL, + "caaUrl" varchar NULL, "createdAt" datetime NOT NULL DEFAULT (datetime('now')), "updatedAt" datetime NOT NULL DEFAULT (datetime('now')) )`