Run mix phx.gen.live properties

This commit is contained in:
Joao Gilberto Balsini Moura 2020-09-14 13:22:25 -03:00
parent 8590df5032
commit 4526435972
13 changed files with 586 additions and 0 deletions

View file

@ -0,0 +1,16 @@
defmodule RealEstate.Repo.Migrations.CreateProperties do
use Ecto.Migration
def change do
create table(:properties) do
add :name, :string
add :price, :decimal
add :description, :text
add :user_id, references(:users, on_delete: :nothing)
timestamps()
end
create index(:properties, [:user_id])
end
end