After "mix phx.gen.live Biddings Bidding biddings bidding_round:integer amount:integer depot_wish_one:string depot_wish_two:string".
This commit is contained in:
18
priv/repo/migrations/20260211151210_create_biddings.exs
Normal file
18
priv/repo/migrations/20260211151210_create_biddings.exs
Normal file
@ -0,0 +1,18 @@
|
||||
defmodule BeetRoundServer.Repo.Migrations.CreateBiddings do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
create table(:biddings, primary_key: false) do
|
||||
add :id, :binary_id, primary_key: true
|
||||
add :bidding_round, :integer
|
||||
add :amount, :integer
|
||||
add :depot_wish_one, :string
|
||||
add :depot_wish_two, :string
|
||||
add :user_id, references(:users, type: :binary_id, on_delete: :delete_all)
|
||||
|
||||
timestamps(type: :utc_datetime)
|
||||
end
|
||||
|
||||
create index(:biddings, [:user_id])
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user