diff options
| author | Haelwenn (lanodan) Monnier <contact@hacktivis.me> | 2022-12-23 17:05:05 +0100 |
|---|---|---|
| committer | Haelwenn (lanodan) Monnier <contact@hacktivis.me> | 2022-12-23 17:05:05 +0100 |
| commit | 7d68d64d633a8ba43965a6f93d22cb0ae76027e0 (patch) | |
| tree | 6c00d45be1aa1fe63ffff71bc2153cdff34e104f /priv/repo/migrations/20220807125023_data_migration_delete_context_objects.exs | |
| parent | d8e326467c30b95c5164f6e29512057dce3c2077 (diff) | |
| parent | 6bce88b9e7876d32ea9146a580454053f0ef3790 (diff) | |
| download | pleroma-7d68d64d633a8ba43965a6f93d22cb0ae76027e0.tar.gz pleroma-7d68d64d633a8ba43965a6f93d22cb0ae76027e0.zip | |
Merge back 2.4.5
Diffstat (limited to 'priv/repo/migrations/20220807125023_data_migration_delete_context_objects.exs')
| -rw-r--r-- | priv/repo/migrations/20220807125023_data_migration_delete_context_objects.exs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/priv/repo/migrations/20220807125023_data_migration_delete_context_objects.exs b/priv/repo/migrations/20220807125023_data_migration_delete_context_objects.exs new file mode 100644 index 000000000..84365dbe3 --- /dev/null +++ b/priv/repo/migrations/20220807125023_data_migration_delete_context_objects.exs @@ -0,0 +1,18 @@ +defmodule Pleroma.Repo.Migrations.DataMigrationDeleteContextObjects do + use Ecto.Migration + + require Logger + + def up do + dt = NaiveDateTime.utc_now() + + execute( + "INSERT INTO data_migrations(name, inserted_at, updated_at) " <> + "VALUES ('delete_context_objects', '#{dt}', '#{dt}') ON CONFLICT DO NOTHING;" + ) + end + + def down do + execute("DELETE FROM data_migrations WHERE name = 'delete_context_objects';") + end +end |
