add models, context and liveviews

This commit is contained in:
2021-09-02 23:31:14 -04:00
committed by oliviasculley
parent feba4e1d14
commit d6ddf2a9bb
52 changed files with 2325 additions and 13 deletions

View File

@ -0,0 +1,18 @@
defmodule Cannery.Repo.Migrations.CreateContainers do
use Ecto.Migration
def change do
create table(:containers, primary_key: false) do
add :id, :binary_id, primary_key: true
add :name, :string
add :desc, :string
add :type, :string
add :location, :string
add :user_id, references(:users, on_delete: :nothing, type: :binary_id)
timestamps()
end
create index(:containers, [:user_id])
end
end