dings with user assoc

This commit is contained in:
Rüdiger Diedrich
2024-02-26 14:37:03 +01:00
parent c242bbc633
commit 8c46519aaf
13 changed files with 638 additions and 0 deletions

View File

@ -0,0 +1,19 @@
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