/* Navicat Premium Dump SQL Optimalisatie voor catalog_featured_pages */ SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for catalog_featured_pages -- ---------------------------- DROP TABLE IF EXISTS `catalog_featured_pages`; CREATE TABLE `catalog_featured_pages` ( -- Geoptimaliseerd: slot_id is meestal klein, TINYINT UNSIGNED bespaart ruimte. `slot_id` TINYINT UNSIGNED NOT NULL COMMENT 'Primary Key: Slot ID van de Feature Box', `image` VARCHAR(70) NOT NULL DEFAULT '', `caption` VARCHAR(130) NOT NULL DEFAULT '', `type` ENUM('page_name','page_id','product_name') NOT NULL DEFAULT 'page_name', -- Blijft INT omdat -1 wordt gebruikt om 'Nooit verlopen' aan te geven. `expire_timestamp` INT NOT NULL DEFAULT -1 COMMENT '-1 betekent nooit verlopen', `page_name` VARCHAR(30) NOT NULL DEFAULT '', -- Moet INT UNSIGNED zijn om te matchen met de geoptimaliseerde catalog_pages.id `page_id` INT UNSIGNED NOT NULL DEFAULT 0, `product_name` VARCHAR(40) NOT NULL DEFAULT '', PRIMARY KEY (`slot_id`), -- NIEUWE Foreign Key: Zorgt dat de page_id een bestaande pagina is. CONSTRAINT `fk_featured_page_id` FOREIGN KEY (`page_id`) REFERENCES `catalog_pages` (`id`) ON DELETE RESTRICT -- Voorkomt dat een cataloguspagina wordt verwijderd zolang deze nog in een feature slot staat. ) ENGINE = InnoDB -- Veranderd van MyISAM naar InnoDB CHARACTER SET = utf8mb4 -- Moderne codering COLLATE = utf8mb4_uca1400_ai_ci ROW_FORMAT = DYNAMIC; -- ---------------------------- -- Records of catalog_featured_pages -- Gecombineerd INSERT statement voor snellere import -- ---------------------------- INSERT INTO `catalog_featured_pages` (`slot_id`, `image`, `caption`, `type`, `expire_timestamp`, `page_name`, `page_id`, `product_name`) VALUES (3, 'catalogue/feature_cata/bc_feature.png', 'Recent toegevoegd meubilair', 'page_name', -1, 'new_furniture', 49, 'new_furniture'), (4, 'catalogue/feature_cata/promo_fantasia22.png', 'Fantasy', 'page_name', -1, 'triggers_custom', 1243445, 'triggers_custom'), (1, 'catalogue/feature_cata/feature_cata_hort_currency.png', 'Wisselkantoor', 'page_name', -1, 'exchange', 12, 'exchange'), (2, 'catalogue/feature_cata/feature_cata_hort_pets.png', 'Costum Dieren', 'page_name', -1, 'pets', 4, 'pets'); SET FOREIGN_KEY_CHECKS = 1;