Upload new version

This commit is contained in:
2026-01-20 01:12:22 +01:00
parent abd74a9a50
commit 3d559924a9
15 changed files with 1632 additions and 517 deletions

View File

@@ -272,5 +272,47 @@ CREATE TABLE IF NOT EXISTS `emailtemplate_template_usage` (
CONSTRAINT `fk_usage_template` FOREIGN KEY (`template_id`) REFERENCES `emailtemplate_templates` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
-- Tabelle: emailtemplate_content_sections
CREATE TABLE IF NOT EXISTS `emailtemplate_content_sections` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`customer_id` int(10) unsigned NOT NULL,
`name` varchar(255) NOT NULL,
`slug` varchar(190) NOT NULL,
`position` int(11) NOT NULL DEFAULT 0,
`is_template` tinyint(1) NOT NULL DEFAULT 0,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`id`),
UNIQUE KEY `uq_sections_customer_slug` (`customer_id`,`slug`),
UNIQUE KEY `uq_sections_customer_name` (`customer_id`,`name`),
KEY `idx_sections_customer` (`customer_id`),
KEY `idx_sections_sort` (`customer_id`,`position`,`id`),
CONSTRAINT `fk_content_sections_customer` FOREIGN KEY (`customer_id`) REFERENCES `emailtemplate_customers` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
-- Tabelle: emailtemplate_content_items
CREATE TABLE IF NOT EXISTS `emailtemplate_content_items` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`customer_id` int(10) unsigned NOT NULL,
`section_id` int(10) unsigned NOT NULL,
`name` varchar(255) NOT NULL,
`api_name` varchar(190) DEFAULT NULL,
`category` varchar(100) DEFAULT NULL,
`json_content` mediumtext DEFAULT NULL,
`html` mediumtext DEFAULT NULL,
`editor_type` varchar(32) DEFAULT NULL,
`craft_json` mediumtext DEFAULT NULL,
`settings_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`settings_json`)),
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`id`),
UNIQUE KEY `uq_items_api` (`customer_id`,`api_name`),
KEY `idx_items_customer` (`customer_id`),
KEY `idx_items_section` (`section_id`),
KEY `idx_items_name` (`name`),
CONSTRAINT `fk_content_items_section` FOREIGN KEY (`section_id`) REFERENCES `emailtemplate_content_sections` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `fk_content_items_customer` FOREIGN KEY (`customer_id`) REFERENCES `emailtemplate_customers` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
SET FOREIGN_KEY_CHECKS = 1;
-- Ende des Schema-Dumps