defmodule Server.Repo.Migrations.CreateHosts do use Ecto.Migration def change do create table(:hosts) do add :name, :string, null: false add :token_hash, :string, null: false add :agent_version, :string add :proxmox_version, :string add :zfs_version, :string add :status, :string, null: false, default: "never_connected" add :last_seen_at, :utc_datetime_usec timestamps(type: :utc_datetime_usec) end create unique_index(:hosts, [:name]) end end