diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2008-12-10 19:44:58 +0000 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2008-12-10 19:44:58 +0000 |
commit | 7e5935d5325a7bc20fb5603a76a5af4d7df499a9 (patch) | |
tree | 08728a94aefb5df32bb084ee676ec81a3c4cd9c3 /core/helpers/core_installer.php | |
parent | 18a6614a11cf39a29f5705edabc710688da357e6 (diff) |
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
Diffstat (limited to 'core/helpers/core_installer.php')
-rw-r--r-- | core/helpers/core_installer.php | 10 |
1 files changed, 10 insertions, 0 deletions
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"); } |