meta/priv/repo/migrations/20201222142443_create_keys.exs
2020-12-23 12:51:05 +01:00

15 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