logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git

20210105195018_create_data_migrations.exs (618B)


  1. # Pleroma: A lightweight social networking server
  2. # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
  3. # SPDX-License-Identifier: AGPL-3.0-only
  4. defmodule Pleroma.Repo.Migrations.CreateDataMigrations do
  5. use Ecto.Migration
  6. def change do
  7. create_if_not_exists table(:data_migrations) do
  8. add(:name, :string, null: false)
  9. add(:state, :integer, default: 1)
  10. add(:feature_lock, :boolean, default: false)
  11. add(:params, :map, default: %{})
  12. add(:data, :map, default: %{})
  13. timestamps()
  14. end
  15. create_if_not_exists(unique_index(:data_migrations, [:name]))
  16. end
  17. end