diff options
| author | Haelwenn <contact+git.pleroma.social@hacktivis.me> | 2022-12-23 17:43:21 +0000 |
|---|---|---|
| committer | Haelwenn <contact+git.pleroma.social@hacktivis.me> | 2022-12-23 17:43:21 +0000 |
| commit | f76c1d4f70fdda6da621a46fb75891e68e266946 (patch) | |
| tree | 328aec763c24b6426decd30fe3b6a4674510bbee /priv/repo/migrations/20220807125023_data_migration_delete_context_objects.exs | |
| parent | d8e326467c30b95c5164f6e29512057dce3c2077 (diff) | |
| parent | 91c22637de5f1683a32207a606c33e7ef3b84676 (diff) | |
| download | pleroma-f76c1d4f70fdda6da621a46fb75891e68e266946.tar.gz pleroma-f76c1d4f70fdda6da621a46fb75891e68e266946.zip | |
Merge branch 'release/2.5.0' into 'stable'
Release 2.5.0
See merge request pleroma/pleroma!3816
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 |
