dings with user assoc
This commit is contained in:
19
priv/repo/migrations/20240226112724_create_dings.exs
Normal file
19
priv/repo/migrations/20240226112724_create_dings.exs
Normal 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
|
Reference in New Issue
Block a user