Files
vctp2/db/migrations_postgres/20240912012927_init.sql
Nathan Coad b9ab34db0a
All checks were successful
continuous-integration/drone/push Build is passing
bugfix reports
2026-01-14 13:51:30 +11:00

38 lines
777 B
SQL

-- +goose Up
-- +goose StatementBegin
CREATE TABLE IF NOT EXISTS "Inventory" (
"Iid" BIGSERIAL PRIMARY KEY,
"Name" TEXT NOT NULL,
"Vcenter" TEXT NOT NULL,
"VmId" TEXT,
"EventKey" TEXT,
"EventId" TEXT,
"CreationTime" BIGINT,
"DeletionTime" BIGINT,
"ResourcePool" TEXT,
"Datacenter" TEXT,
"Cluster" TEXT,
"Folder" TEXT,
"ProvisionedDisk" REAL,
"InitialVcpus" INTEGER,
"InitialRam" INTEGER,
"SrmPlaceholder" INTEGER
);
CREATE TABLE IF NOT EXISTS "Updates" (
"Uid" BIGSERIAL PRIMARY KEY,
"InventoryId" INTEGER,
"UpdateTime" BIGINT,
"UpdateType" TEXT NOT NULL,
"NewVcpus" INTEGER,
"NewRam" INTEGER,
"NewResourcePool" TEXT
);
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
DROP TABLE "Inventory";
DROP TABLE "Updates";
-- +goose StatementEnd