built basic ui structure in /hierarchy

This commit is contained in:
2026-02-14 18:03:13 -06:00
parent d645bda942
commit e4e0775472
24 changed files with 1174 additions and 106 deletions
@@ -0,0 +1,43 @@
defmodule RiverConnect.Repo.Migrations.CreateHierarchy do
use Ecto.Migration
def change do
create table(:springs) do
add :name, :string, null: false
# :dm, :job, :custom
add :type, :string, null: false
add :description, :text
timestamps()
end
create table(:rivers) do
add :name, :string, null: false
add :description, :text
add :spring_id, references(:springs, on_delete: :delete_all), null: false
timestamps()
end
create index(:rivers, [:spring_id])
create table(:streams) do
add :name, :string, null: false
add :topic, :string
add :river_id, references(:rivers, on_delete: :delete_all), null: false
timestamps()
end
create index(:streams, [:river_id])
create table(:trenches) do
add :name, :string
add :stream_id, references(:streams, on_delete: :delete_all), null: false
timestamps()
end
create index(:trenches, [:stream_id])
end
end