From 5ad9ed9648b93e915815780e679b92daaad26fa2 Mon Sep 17 00:00:00 2001 From: Remco Date: Wed, 5 Nov 2025 18:39:54 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=86=99=20optimize=20some=20pages=20?= =?UTF-8?q?=F0=9F=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dutch/catalog_featured_pages_disabled.sql | 67 +++++++++++-------- 1 file changed, 39 insertions(+), 28 deletions(-) diff --git a/Sql files/Dutch/catalog_featured_pages_disabled.sql b/Sql files/Dutch/catalog_featured_pages_disabled.sql index 952ec6c028..a7411fe2e8 100644 --- a/Sql files/Dutch/catalog_featured_pages_disabled.sql +++ b/Sql files/Dutch/catalog_featured_pages_disabled.sql @@ -1,17 +1,6 @@ /* - Navicat Premium Dump SQL - - Source Server : Epicnabbo.nl - Source Server Type : MySQL - Source Server Version : 120001 (12.0.1-MariaDB-ubu2404-log) - Source Host : 185.155.220.63:3306 - Source Schema : habbo - - Target Server Type : MySQL - Target Server Version : 120001 (12.0.1-MariaDB-ubu2404-log) - File Encoding : 65001 - - Date: 08/06/2025 20:17:10 + Navicat Premium Dump SQL + Optimalisatie voor catalog_featured_pages */ SET NAMES utf8mb4; @@ -22,23 +11,45 @@ SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- DROP TABLE IF EXISTS `catalog_featured_pages`; CREATE TABLE `catalog_featured_pages` ( - `slot_id` int NOT NULL, - `image` varchar(70) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', - `caption` varchar(130) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', - `type` enum('page_name','page_id','product_name') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'page_name', - `expire_timestamp` int NOT NULL DEFAULT -1, - `page_name` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', - `page_id` int NOT NULL DEFAULT 0, - `product_name` varchar(40) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', - PRIMARY KEY (`slot_id`) USING BTREE -) ENGINE = MyISAM CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci ROW_FORMAT = DYNAMIC; + -- 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` VALUES (3, 'catalogue/feature_cata/bc_feature.png', 'Recent toegevoegd meubilair', 'page_name', -1, 'new_furniture', 49, 'new_furniture'); -INSERT INTO `catalog_featured_pages` VALUES (4, 'catalogue/feature_cata/promo_fantasia22.png', 'Fantasy', 'page_name', -1, 'triggers_custom', 1243445, 'triggers_custom'); -INSERT INTO `catalog_featured_pages` VALUES (1, 'catalogue/feature_cata/feature_cata_hort_currency.png', 'Wisselkantoor', 'page_name', -1, 'exchange', 12, 'exchange'); -INSERT INTO `catalog_featured_pages` VALUES (2, 'catalogue/feature_cata/feature_cata_hort_pets.png', 'Costum Dieren', 'page_name', -1, 'pets', 4, 'pets'); +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; +SET FOREIGN_KEY_CHECKS = 1; \ No newline at end of file