diff options
author | lain <lain@soykaf.club> | 2020-08-05 11:12:14 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-08-05 11:12:14 +0200 |
commit | 19c108170edb2d72d52c56d82475b565e6fd6b36 (patch) | |
tree | b01fd98f491c60132c424b3c00ebb87c1aa31be6 /priv | |
parent | 878c7f3f309aa5aaa9eababc2c863248dd4420bb (diff) | |
parent | 474aba984f2184d4f028c56f687d1a12f69d5c47 (diff) | |
download | pleroma-19c108170edb2d72d52c56d82475b565e6fd6b36.tar.gz |
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into features/poll-validation
Diffstat (limited to 'priv')
-rw-r--r-- | priv/repo/migrations/20200804180322_remove_nonlocal_expirations.exs | 19 | ||||
-rw-r--r-- | priv/repo/migrations/20200804183107_add_unique_index_to_app_client_id.exs | 7 |
2 files changed, 26 insertions, 0 deletions
diff --git a/priv/repo/migrations/20200804180322_remove_nonlocal_expirations.exs b/priv/repo/migrations/20200804180322_remove_nonlocal_expirations.exs new file mode 100644 index 000000000..389935f0d --- /dev/null +++ b/priv/repo/migrations/20200804180322_remove_nonlocal_expirations.exs @@ -0,0 +1,19 @@ +defmodule Pleroma.Repo.Migrations.RemoveNonlocalExpirations do + use Ecto.Migration + + def up do + statement = """ + DELETE FROM + activity_expirations A USING activities B + WHERE + A.activity_id = B.id + AND B.local = false; + """ + + execute(statement) + end + + def down do + :ok + end +end diff --git a/priv/repo/migrations/20200804183107_add_unique_index_to_app_client_id.exs b/priv/repo/migrations/20200804183107_add_unique_index_to_app_client_id.exs new file mode 100644 index 000000000..83de18096 --- /dev/null +++ b/priv/repo/migrations/20200804183107_add_unique_index_to_app_client_id.exs @@ -0,0 +1,7 @@ +defmodule Pleroma.Repo.Migrations.AddUniqueIndexToAppClientId do + use Ecto.Migration + + def change do + create(unique_index(:apps, [:client_id])) + end +end |