diff options
Diffstat (limited to 'priv/repo/migrations/20201007131955_add_config_version.exs')
-rw-r--r-- | priv/repo/migrations/20201007131955_add_config_version.exs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/priv/repo/migrations/20201007131955_add_config_version.exs b/priv/repo/migrations/20201007131955_add_config_version.exs new file mode 100644 index 000000000..1cbfcb398 --- /dev/null +++ b/priv/repo/migrations/20201007131955_add_config_version.exs @@ -0,0 +1,14 @@ +defmodule Pleroma.Repo.Migrations.AddConfigVersion do + use Ecto.Migration + + def change do + create_if_not_exists table(:config_versions) do + add(:backup, :binary) + add(:current, :boolean) + + timestamps() + end + + create_if_not_exists(unique_index(:config_versions, [:current], where: "current = true")) + end +end |