Skip to content

Commit 7f33a1e

Browse files
committed
Fix migration: use proper JSONB syntax and valid category enum values
1 parent 1550c9f commit 7f33a1e

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

apps/api/src/db/migrations/0003_add_email_config.sql

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@
33

44
-- Email SMTP configuration
55
INSERT INTO config (id, value, description, category, type, default_value, min_value, max_value, is_read_only, requires_restart, updated_at, updated_by) VALUES
6-
('email-host', 'smtp.gmail.com', 'SMTP server hostname', 'general', 'string', 'smtp.gmail.com', NULL, NULL, false, false, NOW(), NULL),
6+
('email-host', '"smtp.gmail.com"', 'SMTP server hostname', 'general', 'string', '"smtp.gmail.com"', NULL, NULL, false, false, NOW(), NULL),
77
('email-port', '587', 'SMTP server port', 'general', 'number', '587', '1', '65535', false, false, NOW(), NULL),
88
('email-secure', 'false', 'Use SSL/TLS for SMTP connection', 'general', 'boolean', 'false', NULL, NULL, false, false, NOW(), NULL),
9-
('email-user', '', 'SMTP authentication username', 'general', 'string', '', NULL, NULL, false, false, NOW(), NULL),
10-
('email-password', '', 'SMTP authentication password', 'general', 'string', '', NULL, NULL, false, false, NOW(), NULL),
11-
('email-from', 'noreply@crackhouse.local', 'From email address for system emails', 'general', 'string', 'noreply@crackhouse.local', NULL, NULL, false, false, NOW(), NULL),
9+
('email-user', '""', 'SMTP authentication username', 'general', 'string', '""', NULL, NULL, false, false, NOW(), NULL),
10+
('email-password', '""', 'SMTP authentication password', 'general', 'string', '""', NULL, NULL, false, false, NOW(), NULL),
11+
('email-from', '"noreply@crackhouse.local"', 'From email address for system emails', 'general', 'string', '"noreply@crackhouse.local"', NULL, NULL, false, false, NOW(), NULL),
1212
('email-enabled', 'false', 'Enable email notifications', 'general', 'boolean', 'false', NULL, NULL, false, false, NOW(), NULL);
1313

1414
-- Email notification preferences
1515
INSERT INTO config (id, value, description, category, type, default_value, min_value, max_value, is_read_only, requires_restart, updated_at, updated_by) VALUES
16-
('email-notify-job-complete', 'true', 'Send email when job completes', 'notifications', 'boolean', 'true', NULL, NULL, false, false, NOW(), NULL),
17-
('email-notify-job-failed', 'true', 'Send email when job fails', 'notifications', 'boolean', 'true', NULL, NULL, false, false, NOW(), NULL),
18-
('email-notify-health-degraded', 'true', 'Send email when system health is degraded', 'notifications', 'boolean', 'true', NULL, NULL, false, false, NOW(), NULL),
19-
('email-notify-health-critical', 'true', 'Send email when system health is critical', 'notifications', 'boolean', 'true', NULL, NULL, false, NOW(), NULL),
20-
('email-notify-security-events', 'true', 'Send email for security events', 'notifications', 'boolean', 'true', NULL, NULL, false, false, NOW(), NULL);
16+
('email-notify-job-complete', 'true', 'Send email when job completes', 'general', 'boolean', 'true', NULL, NULL, false, false, NOW(), NULL),
17+
('email-notify-job-failed', 'true', 'Send email when job fails', 'general', 'boolean', 'true', NULL, NULL, false, false, NOW(), NULL),
18+
('email-notify-health-degraded', 'true', 'Send email when system health is degraded', 'general', 'boolean', 'true', NULL, NULL, false, false, NOW(), NULL),
19+
('email-notify-health-critical', 'true', 'Send email when system health is critical', 'general', 'boolean', 'true', NULL, NULL, false, false, NOW(), NULL),
20+
('email-notify-security-events', 'true', 'Send email for security events', 'security', 'boolean', 'true', NULL, NULL, false, false, NOW(), NULL);
2121

2222
-- Email queue configuration
2323
INSERT INTO config (id, value, description, category, type, default_value, min_value, max_value, is_read_only, requires_restart, updated_at, updated_by) VALUES

0 commit comments

Comments
 (0)