godcrm/backend/database/migrations/008-add-schema-layouts.sql
GOD CRM Release f89e074dd1
Some checks failed
CI / Lint / Typecheck / Test / Build (push) Has been cancelled
CI / PostgreSQL Integration Tests (push) Has been cancelled
GOD CRM — public scrubbed snapshot
Governed substrate for autonomous agents: scoped identity (passports),
audited actions, MCP workspace. Infra IPs and secrets redacted for public release.
2026-08-10 04:01:45 +03:00

14 lines
520 B
SQL

-- Migration: Add schema_layouts table for storing node positions
-- Date: 2024-12-19
CREATE TABLE IF NOT EXISTS schema_layouts (
id INTEGER PRIMARY KEY AUTOINCREMENT,
space_id INTEGER NOT NULL UNIQUE,
layout TEXT NOT NULL, -- JSON array of { tableId, x, y }
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (space_id) REFERENCES spaces(id) ON DELETE CASCADE
);
CREATE INDEX IF NOT EXISTS idx_schema_layouts_space ON schema_layouts(space_id);