[day-04] add training schema

With this we can represent a traning program for a user.
This commit is contained in:
Joao P Dubas
2021-06-26 17:21:29 +00:00
parent 96a3e2e9f0
commit ea5616addf
4 changed files with 54 additions and 0 deletions

View File

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