15 lines
No EOL
599 B
SQL
15 lines
No EOL
599 B
SQL
-- Create servers table if it doesn't exist
|
|
CREATE TABLE IF NOT EXISTS servers (
|
|
id VARCHAR(36) PRIMARY KEY,
|
|
name VARCHAR(255) NOT NULL,
|
|
model VARCHAR(255) NOT NULL,
|
|
cpu_model VARCHAR(255) NOT NULL,
|
|
cpu_cores INT NOT NULL,
|
|
cpu_count INT NOT NULL,
|
|
ram_gb INT NOT NULL,
|
|
proxmox_url VARCHAR(255) NOT NULL,
|
|
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
|
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
|
INDEX idx_created_at (created_at),
|
|
INDEX idx_name (name)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |