ex_trainer/priv/repo/migrations/20210624003633_create_trainings_table.exs
Joao P Dubas ea5616addf [day-04] add training schema
With this we can represent a traning program for a user.
2021-06-26 17:25:53 +00:00

14 lines
287 B
Elixir

defmodule Wabanex.Repo.Migrations.CreateTrainingsTable do
use Ecto.Migration
def change do
create table(:trainings) do
add :start_date, :date, null: false
add :end_date, :date
add :user_id, references(:users), null: false
timestamps()
end
end
end