Autogen calendars
This commit is contained in:
15
priv/repo/migrations/20230607151852_create_calendars.exs
Normal file
15
priv/repo/migrations/20230607151852_create_calendars.exs
Normal file
@@ -0,0 +1,15 @@
|
||||
defmodule Osuuspuutarha.Repo.Migrations.CreateCalendars do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
create table(:calendars) do
|
||||
add :pickup_date, :date
|
||||
add :is_picked_up, :boolean, default: false, null: false
|
||||
add :order_id, references(:orders, on_delete: :nothing)
|
||||
|
||||
timestamps()
|
||||
end
|
||||
|
||||
create index(:calendars, [:order_id])
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user