- Add start/stop/reboot endpoints for server power management - Add D1-based logging system (logs table + db-logger utility) - Add idempotency_key validation for order deduplication - Extend VPS provider interface with lifecycle methods Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
14 lines
424 B
SQL
14 lines
424 B
SQL
-- D1 로깅 테이블
|
|
CREATE TABLE IF NOT EXISTS logs (
|
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
level TEXT NOT NULL,
|
|
service TEXT NOT NULL,
|
|
message TEXT NOT NULL,
|
|
context TEXT,
|
|
created_at TEXT DEFAULT (datetime('now'))
|
|
);
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_logs_created ON logs(created_at DESC);
|
|
CREATE INDEX IF NOT EXISTS idx_logs_level ON logs(level);
|
|
CREATE INDEX IF NOT EXISTS idx_logs_service ON logs(service);
|