diff options
author | Benjamin Neff <benjamin@coding4coffee.ch> | 2021-10-29 04:08:01 +0300 |
---|---|---|
committer | Benjamin Neff <benjamin@coding4coffee.ch> | 2021-11-23 02:43:56 +0300 |
commit | 1570e3fb9afb6d312c94118f5bae5463021d9bae (patch) | |
tree | 3055031428a2691e85dcc4a2ec1a1d1e0dea1df9 /db | |
parent | c67fc4e0f77cd687c314184c33c08b5e3f2594ed (diff) |
Migrate remote_photo_path and cleanup old photo uploads
If the migration contains a new remote_photo_path migrate all photos of
the old person to this path. If the person was local before, cleanup old
uploaded files of the photos.
closes #8314
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20211027230348_add_remote_photo_path_to_account_migration.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/db/migrate/20211027230348_add_remote_photo_path_to_account_migration.rb b/db/migrate/20211027230348_add_remote_photo_path_to_account_migration.rb new file mode 100644 index 000000000..291d88c95 --- /dev/null +++ b/db/migrate/20211027230348_add_remote_photo_path_to_account_migration.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +class AddRemotePhotoPathToAccountMigration < ActiveRecord::Migration[5.2] + def change + add_column :account_migrations, :remote_photo_path, :text + end +end |