[day-04] add training schema
With this we can represent a traning program for a user.
This commit is contained in:
@@ -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
|
Reference in New Issue
Block a user