Fix notification_templates table column names
Update auth email template migration and edge function to use correct column names: - template_key → key - subject → email_subject - html_content → email_body_html Matches existing notification_templates schema used in NotifikasiTab. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -4,18 +4,15 @@
|
||||
|
||||
-- Insert default auth email verification template
|
||||
INSERT INTO notification_templates (
|
||||
template_key,
|
||||
template_name,
|
||||
description,
|
||||
subject,
|
||||
html_content,
|
||||
key,
|
||||
name,
|
||||
is_active,
|
||||
created_at,
|
||||
updated_at
|
||||
email_subject,
|
||||
email_body_html
|
||||
) VALUES (
|
||||
'auth_email_verification',
|
||||
'Verifikasi Email - OTP',
|
||||
'Template untuk mengirim kode OTP verifikasi email saat pendaftaran',
|
||||
true,
|
||||
'Kode Verifikasi Email Anda - {platform_name}',
|
||||
'---
|
||||
<!DOCTYPE html>
|
||||
@@ -96,15 +93,6 @@ INSERT INTO notification_templates (
|
||||
color: #666;
|
||||
border-top: 2px solid #000;
|
||||
}
|
||||
.button {
|
||||
display: inline-block;
|
||||
background: #000;
|
||||
color: #fff;
|
||||
padding: 12px 24px;
|
||||
text-decoration: none;
|
||||
font-weight: 600;
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -146,14 +134,8 @@ INSERT INTO notification_templates (
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
---',
|
||||
true,
|
||||
NOW(),
|
||||
NOW()
|
||||
) ON CONFLICT (template_key) DO NOTHING;
|
||||
|
||||
-- Add comment
|
||||
COMMENT ON TABLE notification_templates IS 'Contains email templates for various notifications including auth emails';
|
||||
---'
|
||||
) ON CONFLICT (key) DO NOTHING;
|
||||
|
||||
-- Return success message
|
||||
DO $$
|
||||
|
||||
Reference in New Issue
Block a user