Current section

Files

Jump to
mishka_installer priv repo migrations 20220616155151_plugin_migration.exs
Raw

priv/repo/migrations/20220616155151_plugin_migration.exs

defmodule MishkaInstaller.Repo.Migrations.CreateMishkaInistrallerPluginTable do
use Ecto.Migration
def change do
create table(:plugins, primary_key: false) do
add(:id, :uuid, primary_key: true)
add(:name, :string, size: 200, null: false)
add(:event, :string, size: 200, null: false)
add(:priority, :integer, null: false)
add(:status, :integer, null: false)
add(:depend_type, :integer, null: false)
add(:depends, {:array, :string}, null: true)
add(:extra, {:array, :map}, null: false)
timestamps()
end
create(
index(:plugins, [:name],
name: :index_plugins_on_name,
unique: true
)
)
end
end