[#3213] Prototype of data migrations functionality / HashtagsTableMigrator.

This commit is contained in:
Ivan Tashkinov 2021-01-13 22:07:38 +03:00
commit 3e4d84729a
11 changed files with 316 additions and 64 deletions

View file

@ -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