1
0
mirror of https://github.com/danbee/chess synced 2025-03-04 08:39:06 +00:00

These should never be null

This commit is contained in:
Daniel Barber 2018-05-25 15:48:29 -04:00
parent a66bc2655b
commit 381ad98d2b
Signed by: danbarber
GPG Key ID: 931D8112E0103DD8

View File

@ -4,9 +4,9 @@ defmodule Chess.Repo.Migrations.CreateMoves do
def change do
create table(:moves) do
add :game_id, references(:games, on_delete: :delete_all)
add :from, :map
add :to, :map
add :piece, :map
add :from, :map, null: false
add :to, :map, null: false
add :piece, :map, null: false
add :piece_captured, :map
timestamps()