From d5f0d3ee8c884386acccfd7f73f381aef91fde53 Mon Sep 17 00:00:00 2001 From: SoXX Date: Tue, 15 Oct 2024 15:20:30 +0200 Subject: [PATCH] fix(database): migration - fix wrong id types --- pkg/database/migrations/005_id_fixes.sql | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 pkg/database/migrations/005_id_fixes.sql diff --git a/pkg/database/migrations/005_id_fixes.sql b/pkg/database/migrations/005_id_fixes.sql new file mode 100644 index 0000000..9184935 --- /dev/null +++ b/pkg/database/migrations/005_id_fixes.sql @@ -0,0 +1,13 @@ +-- +migrate Up +ALTER TABLE "PostReference" + ALTER COLUMN post_id TYPE CHAR(25), + ALTER COLUMN source_id TYPE CHAR(25); + +ALTER TABLE post_tags + ALTER COLUMN post_id TYPE CHAR(25); + +ALTER TABLE "UserFavorites" + ALTER COLUMN post_id TYPE CHAR(25); + +ALTER TABLE "UserSource" + ALTER COLUMN source_id TYPE CHAR(25);