feat(server): host schema, context, auth, status transitions
This commit is contained in:
parent
bab31b7c4e
commit
b141ee7816
5 changed files with 174 additions and 0 deletions
19
server/priv/repo/migrations/20260421200116_create_hosts.exs
Normal file
19
server/priv/repo/migrations/20260421200116_create_hosts.exs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue