charbase/priv/repo/migrations/20190806232402_create_chara...

17 lines
349 B
Elixir
Raw Normal View History

2019-08-06 19:33:53 -04:00
defmodule Charbase.Repo.Migrations.CreateCharacters do
use Ecto.Migration
def change do
create table(:characters) do
add :name, :string
add :json, :text
add :added, :naive_datetime
add :user_id, references(:users, on_delete: :nothing)
timestamps()
end
create index(:characters, [:user_id])
end
end