-- +goose Up
-- +goose StatementBegin
CREATE TABLE IF NOT EXISTS "Inventory" (
	"Iid"	INTEGER UNIQUE,
	"Name"	TEXT NOT NULL,
    "Vcenter" TEXT NOT NULL,
    "VmId" TEXT,
    "EventKey" TEXT,
    "EventId" TEXT,
	"CreationTime"	INTEGER,
	"DeletionTime"	INTEGER,
	"ResourcePool"	TEXT,
	"VmType"	TEXT,
	"Datacenter"	TEXT,
	"Cluster"	TEXT,
	"Folder"	TEXT,
	"ProvisionedDisk"	REAL,
	"InitialVcpus"	INTEGER,
	"InitialRam"	INTEGER,
	"SrmPlaceholder"	INTEGER
);

CREATE TABLE IF NOT EXISTS "Updates" (
    "Uid" INTEGER UNIQUE,
    "InventoryId" INTEGER,
    "UpdateTime" INTEGER,
    "UpdateType" TEXT NOT NULL,
    "NewVcpus" INTEGER,
    "NewRam" INTEGER,
    "NewResourcePool" TEXT
)
-- +goose StatementEnd

-- +goose Down
-- +goose StatementBegin
DROP TABLE "Inventory";
DROP TABLE "Updates";
-- +goose StatementEnd
