Update types.ts
This commit is contained in:
31
types.ts
31
types.ts
@@ -18,18 +18,37 @@ export interface ToastMessage {
|
|||||||
text: string;
|
text: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Simple schema for n8n SQL generation
|
// Uniform schema for both Postgres and MySQL, showing the VARCHAR id needed for UUIDs
|
||||||
export const SQL_SCHEMA = `
|
export const SQL_SCHEMA = `
|
||||||
|
-- Per MySQL
|
||||||
CREATE TABLE IF NOT EXISTS email_templates (
|
CREATE TABLE IF NOT EXISTS email_templates (
|
||||||
id INT AUTO_INCREMENT PRIMARY KEY,
|
id VARCHAR(255) PRIMARY KEY,
|
||||||
template_key VARCHAR(255) UNIQUE NOT NULL,
|
template_key VARCHAR(255) UNIQUE NOT NULL,
|
||||||
|
name VARCHAR(255) NOT NULL,
|
||||||
|
description TEXT,
|
||||||
subject VARCHAR(255),
|
subject VARCHAR(255),
|
||||||
header_html TEXT,
|
header_html MEDIUMTEXT,
|
||||||
body_html TEXT,
|
body_html MEDIUMTEXT,
|
||||||
footer_html TEXT,
|
footer_html MEDIUMTEXT,
|
||||||
full_html TEXT,
|
full_html MEDIUMTEXT,
|
||||||
required_variables JSON,
|
required_variables JSON,
|
||||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
||||||
);
|
);
|
||||||
|
|
||||||
|
-- Per PostgreSQL
|
||||||
|
-- CREATE TABLE IF NOT EXISTS email_templates (
|
||||||
|
-- id VARCHAR(255) PRIMARY KEY,
|
||||||
|
-- template_key VARCHAR(255) UNIQUE NOT NULL,
|
||||||
|
-- name VARCHAR(255) NOT NULL,
|
||||||
|
-- description TEXT,
|
||||||
|
-- subject VARCHAR(255),
|
||||||
|
-- header_html TEXT,
|
||||||
|
-- body_html TEXT,
|
||||||
|
-- footer_html TEXT,
|
||||||
|
-- full_html TEXT,
|
||||||
|
-- required_variables JSONB,
|
||||||
|
-- created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
-- updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||||
|
-- );
|
||||||
`;
|
`;
|
||||||
Reference in New Issue
Block a user