meta/priv/repo/migrations/20201222142443_create_keys.exs

16 lines
306 B
Elixir

defmodule RecycledCloud.Repo.Migrations.CreateKeys do
use Ecto.Migration
def change do
create table(:keys) do
add :comment, :string
add :value, :text
add :user_id, references(:users, on_delete: :nothing)
timestamps()
end
create index(:keys, [:user_id])
end
end