up
This commit is contained in:
14
schema.sql
14
schema.sql
@@ -18,6 +18,7 @@ DROP TABLE IF EXISTS `emailtemplate_snippets`;
|
||||
DROP TABLE IF EXISTS `emailtemplate_blocks`;
|
||||
DROP TABLE IF EXISTS `emailtemplate_sections`;
|
||||
DROP TABLE IF EXISTS `emailtemplate_templates`;
|
||||
DROP TABLE IF EXISTS `emailtemplate_customer_settings`;
|
||||
/*DROP TABLE IF EXISTS `customers`; -- optional (nur falls lokal hier gepflegt) */
|
||||
/*DROP TABLE IF EXISTS `customer_users`; -- optional */
|
||||
|
||||
@@ -164,6 +165,18 @@ CREATE TABLE `emailtemplate_section_items` (
|
||||
ON UPDATE CASCADE ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
/* 8) Kundenbezogene Einstellungen (Bridge/Sender/API Tokens) */
|
||||
CREATE TABLE `emailtemplate_customer_settings` (
|
||||
`customer_id` INT UNSIGNED NOT NULL,
|
||||
`bridge_url` VARCHAR(500) DEFAULT NULL,
|
||||
`bridge_token` VARCHAR(255) DEFAULT NULL,
|
||||
`sender_token` VARCHAR(255) DEFAULT NULL,
|
||||
`external_api_token` VARCHAR(255) DEFAULT NULL,
|
||||
`created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`updated_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`customer_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
/* =========================
|
||||
Optionale Seed-Daten
|
||||
========================= */
|
||||
@@ -174,4 +187,3 @@ CREATE TABLE `emailtemplate_section_items` (
|
||||
|
||||
-- FK-Prüfung (falls temporär deaktiviert) wieder aktivieren
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user