use belongs_to instead of field for references

This commit is contained in:
2021-09-12 18:54:53 -04:00
committed by oliviasculley
parent f96956cf5e
commit 8827858204
4 changed files with 25 additions and 10 deletions

View File

@ -7,6 +7,7 @@ defmodule Cannery.Repo.Migrations.CreateTags do
add :name, :string
add :bg_color, :string
add :text_color, :string
add :user_id, references(:users, on_delete: :nothing, type: :binary_id)
timestamps()