From dece149c9e7b624d1ace5eddda2c37a76f200d73 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 27 Jul 2022 12:49:55 +0200 Subject: [PATCH] :tada: Add migration for fix legacy storage object backend names --- backend/src/app/migrations.clj | 3 +++ .../migrations/sql/0076-mod-storage-object-table.sql | 10 ++++++++++ 2 files changed, 13 insertions(+) create mode 100644 backend/src/app/migrations/sql/0076-mod-storage-object-table.sql diff --git a/backend/src/app/migrations.clj b/backend/src/app/migrations.clj index 3bf301f36..a861fe218 100644 --- a/backend/src/app/migrations.clj +++ b/backend/src/app/migrations.clj @@ -235,6 +235,9 @@ {:name "0075-mod-share-link-table" :fn (mg/resource "app/migrations/sql/0075-mod-share-link-table.sql")} + + {:name "0076-mod-storage-object-table" + :fn (mg/resource "app/migrations/sql/0076-mod-storage-object-table.sql")} ]) diff --git a/backend/src/app/migrations/sql/0076-mod-storage-object-table.sql b/backend/src/app/migrations/sql/0076-mod-storage-object-table.sql new file mode 100644 index 000000000..6b64ea378 --- /dev/null +++ b/backend/src/app/migrations/sql/0076-mod-storage-object-table.sql @@ -0,0 +1,10 @@ +-- Renames the old, already deprecated backend name with new one on +-- all storage object rows. + +UPDATE storage_object + SET backend = 'assets-fs' + WHERE backend = 'fs'; + +UPDATE storage_object + SET backend = 'assets-s3' + WHERE backend = 's3';