From 8a08a2ea6a2a8779fab5628102560e7d8ff0a24a Mon Sep 17 00:00:00 2001 From: laker-93 Date: Thu, 17 Apr 2025 09:08:50 +0100 Subject: [PATCH] add downgrade (#4) --- db/migrations/20241227222849_duplicate.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/db/migrations/20241227222849_duplicate.go b/db/migrations/20241227222849_duplicate.go index 6121ad7ef..3cc270696 100644 --- a/db/migrations/20241227222849_duplicate.go +++ b/db/migrations/20241227222849_duplicate.go @@ -20,6 +20,11 @@ alter table media_file } func downDuplicate(ctx context.Context, tx *sql.Tx) error { - // This code is executed when the migration is rolled back. - return nil + _, err := tx.Exec(` +alter table media_file + drop column is_duplicate; + +`) + return err +} } \ No newline at end of file