28 lines
612 B
SQL
28 lines
612 B
SQL
-- +goose Up
|
|
-- +goose StatementBegin
|
|
CREATE TABLE machine (
|
|
id UUID NOT NULL DEFAULT generate_ulid(),
|
|
|
|
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
machine_name VARCHAR(255) NOT NULL,
|
|
description text,
|
|
os_type VARCHAR(255) NOT NULL,
|
|
os_arch VARCHAR(255) NOT NULL,
|
|
hostname VARCHAR(255),
|
|
first_seen TIMESTAMP,
|
|
last_seen TIMESTAMP,
|
|
public_ipv4_address INET,
|
|
public_ipv6_address INET,
|
|
uptime_seconds INT,
|
|
logged_on_users VARCHAR(255),
|
|
os_version VARCHAR(255),
|
|
|
|
PRIMARY KEY(id)
|
|
);
|
|
-- +goose StatementEnd
|
|
|
|
-- +goose Down
|
|
-- +goose StatementBegin
|
|
DROP TABLE machine;
|
|
-- +goose StatementEnd
|