defmodule DaProductApp.Repo.Migrations.CreateTerminalGroups do use Ecto.Migration def change do create table(:terminal_groups) do add :name, :string, null: false add :description, :string add :group_type, :string, default: "custom" add :color, :string, default: "#3B82F6" add :icon, :string, default: "hero-squares-2x2" add :is_active, :boolean, default: true add :created_by, :string add :metadata, :map, default: %{} add :parent_group_id, :id timestamps(type: :utc_datetime) end create unique_index(:terminal_groups, [:name]) create index(:terminal_groups, [:parent_group_id]) create index(:terminal_groups, [:group_type]) create index(:terminal_groups, [:is_active]) end end