memEx/priv/repo/migrations/20220726001809_create_steps.exs
2022-11-26 20:37:56 -05:00

21 lines
542 B
Elixir

defmodule Memex.Repo.Migrations.CreateSteps do
use Ecto.Migration
def change do
create table(:steps, primary_key: false) do
add :id, :binary_id, primary_key: true
add :title, :string
add :content, :text
add :position, :integer
add :pipeline_id, references(:pipelines, on_delete: :nothing, type: :binary_id)
add :user_id, references(:users, on_delete: :nothing, type: :binary_id)
timestamps()
end
create index(:steps, [:pipeline_id])
create index(:steps, [:user_id])
end
end