proxmox_choose_page/supabase/migrations/20250323010819_warm_marsh.sql
2025-03-23 02:25:43 +01:00

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;