godcrm/backend/database/migrations/v2.0.0-create-system-settings.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

23 lines
767 B
SQL

-- Migration: Create system_settings table
-- Version: v2.0.0
-- Date: 2025-11-11
-- Description: Store system-wide configuration (SMTP, settings, etc.)
CREATE TABLE IF NOT EXISTS system_settings (
id INTEGER PRIMARY KEY AUTOINCREMENT,
key TEXT UNIQUE NOT NULL,
value TEXT NOT NULL,
encrypted BOOLEAN DEFAULT 0,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP
);
-- Create index for faster key lookups
CREATE INDEX IF NOT EXISTS idx_system_settings_key ON system_settings(key);
-- Insert default settings
INSERT OR IGNORE INTO system_settings (key, value, encrypted) VALUES
('smtp_configured', 'false', 0),
('onboarding_completed', 'false', 0),
('app_name', 'GOD CRM', 0),
('app_version', '0.002.001', 0);