Files
apex/server/db/migrations/003_room_configs.sql
2026-02-13 00:21:53 +01:00

13 lines
450 B
SQL

-- Migration: Room configurations table for AI-analyzed room layouts
-- Stores room analysis results linked to orders
CREATE TABLE IF NOT EXISTS room_configs (
id INTEGER PRIMARY KEY AUTOINCREMENT,
order_id INTEGER REFERENCES orders(id),
image_path TEXT,
analysis_json TEXT NOT NULL,
created_at TEXT DEFAULT (datetime('now'))
);
CREATE INDEX IF NOT EXISTS idx_room_configs_order ON room_configs(order_id);