20 lines
444 B
Elixir
20 lines
444 B
Elixir
defmodule Dinge.Repo.Migrations.CreateDings do
|
|
use Ecto.Migration
|
|
|
|
def change do
|
|
create table(:dings) do
|
|
add :title, :string
|
|
add :count, :integer
|
|
add :target_count, :integer
|
|
add :ding_type, :string
|
|
add :target_type, :string
|
|
add :status, :string
|
|
add :user_id, references(:users, on_delete: :nothing)
|
|
|
|
timestamps(type: :utc_datetime)
|
|
end
|
|
|
|
create index(:dings, [:user_id])
|
|
end
|
|
end
|