17 lines
638 B
SQL
17 lines
638 B
SQL
-- migrate:up
|
|
-- The VMs the page can control. The live state is never stored here: it is read
|
|
-- from libvirt on every request. This table only holds what libvirt does not know:
|
|
-- how we want to present the domain in the UI.
|
|
CREATE TABLE vms (
|
|
id SERIAL PRIMARY KEY,
|
|
-- Name of the libvirt domain, as shown by `virsh list --all`
|
|
"domain" TEXT NOT NULL UNIQUE,
|
|
"display_name" TEXT NOT NULL,
|
|
-- Icon key resolved by the frontend ('windows', 'linux', ...)
|
|
"icon" TEXT NOT NULL DEFAULT 'linux',
|
|
-- Display order on the page
|
|
"position" INTEGER NOT NULL DEFAULT 0
|
|
);
|
|
|
|
-- migrate:down
|
|
DROP TABLE IF EXISTS vms;
|