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

16 lines
306 B
Elixir
Raw Normal View History

2020-12-23 12:51:05 +01:00
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