From 7e5935d5325a7bc20fb5603a76a5af4d7df499a9 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Wed, 10 Dec 2008 19:44:58 +0000 Subject: Create a module parameter table. This will be useful if a module wants to store information, but is not enough to warrant a table of its own --- core/helpers/core_installer.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'core/helpers/core_installer.php') diff --git a/core/helpers/core_installer.php b/core/helpers/core_installer.php index 052b9cb5..95d46597 100644 --- a/core/helpers/core_installer.php +++ b/core/helpers/core_installer.php @@ -82,6 +82,15 @@ class core_installer { UNIQUE KEY(`name`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;"); + $db->query("CREATE TABLE `parameters` ( + `id` int(9) NOT NULL auto_increment, + `module_id` int(9), + `name` char(255) NOT NULL, + `value` text, + PRIMARY KEY (`id`), + UNIQUE KEY(`module_id`, `name`)) + ENGINE=InnoDB DEFAULT CHARSET=utf8;"); + foreach (array("albums", "resizes") as $dir) { @mkdir(VARPATH . $dir); } @@ -115,6 +124,7 @@ class core_installer { $db->query("DROP TABLE IF EXISTS `permissions`;"); $db->query("DROP TABLE IF EXISTS `items`;"); $db->query("DROP TABLE IF EXISTS `modules`;"); + $db->query("DROP TABLE IF EXISTS `parameters`;"); system("/bin/rm -rf " . VARPATH . "albums"); system("/bin/rm -rf " . VARPATH . "resizes"); } -- cgit v1.2.3