summaryrefslogtreecommitdiff
path: root/priv/repo/migrations/20210105195018_create_data_migrations.exs
diff options
context:
space:
mode:
authorAlex Gleason <alex@alexgleason.me>2021-04-30 13:17:03 -0500
committerAlex Gleason <alex@alexgleason.me>2021-04-30 13:17:03 -0500
commit52fc59f125c10ad73b9fd1a0639b6dc5681776ca (patch)
tree7de32329acbdd4bdf5c753678a2d459c61b58d80 /priv/repo/migrations/20210105195018_create_data_migrations.exs
parenta8fa00ef666f574aec8048626aed78a7d62e6915 (diff)
parent377f84f3678f9c2541fbd4a200cd93c5ab0dea24 (diff)
downloadpleroma-52fc59f125c10ad73b9fd1a0639b6dc5681776ca.tar.gz
pleroma-52fc59f125c10ad73b9fd1a0639b6dc5681776ca.zip
Merge remote-tracking branch 'upstream/develop' into earmark
Diffstat (limited to 'priv/repo/migrations/20210105195018_create_data_migrations.exs')
-rw-r--r--priv/repo/migrations/20210105195018_create_data_migrations.exs17
1 files changed, 17 insertions, 0 deletions
diff --git a/priv/repo/migrations/20210105195018_create_data_migrations.exs b/priv/repo/migrations/20210105195018_create_data_migrations.exs
new file mode 100644
index 000000000..5f2e8d96c
--- /dev/null
+++ b/priv/repo/migrations/20210105195018_create_data_migrations.exs
@@ -0,0 +1,17 @@
+defmodule Pleroma.Repo.Migrations.CreateDataMigrations do
+ use Ecto.Migration
+
+ def change do
+ create_if_not_exists table(:data_migrations) do
+ add(:name, :string, null: false)
+ add(:state, :integer, default: 1)
+ add(:feature_lock, :boolean, default: false)
+ add(:params, :map, default: %{})
+ add(:data, :map, default: %{})
+
+ timestamps()
+ end
+
+ create_if_not_exists(unique_index(:data_migrations, [:name]))
+ end
+end