diff options
| author | Bharat Mediratta <bharat@menalto.com> | 2008-12-30 01:37:09 +0000 |
|---|---|---|
| committer | Bharat Mediratta <bharat@menalto.com> | 2008-12-30 01:37:09 +0000 |
| commit | f29aad03a630d623a13a31f417947add92aa81f9 (patch) | |
| tree | 99f434090decd353b51cb73fdbc089ca7452c79c /modules/tag/helpers | |
| parent | 79e2c4bd47f34215b7a7f436304e88032f26a5bc (diff) | |
Make some columns smaller so that multi-column keys don't exceed 1024
bytes on some systems.
Diffstat (limited to 'modules/tag/helpers')
| -rw-r--r-- | modules/tag/helpers/tag_installer.php | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/modules/tag/helpers/tag_installer.php b/modules/tag/helpers/tag_installer.php index 5734b243..2e0b9085 100644 --- a/modules/tag/helpers/tag_installer.php +++ b/modules/tag/helpers/tag_installer.php @@ -23,21 +23,21 @@ class tag_installer { $version = module::get_version("tag"); if ($version == 0) { $db->query("CREATE TABLE IF NOT EXISTS `tags` ( - `id` int(9) NOT NULL auto_increment, - `name` varchar(255) NOT NULL, - `count` int(10) unsigned NOT NULL DEFAULT 0, - PRIMARY KEY (`id`), - UNIQUE KEY(`name`)) - ENGINE=InnoDB DEFAULT CHARSET=utf8;"); + `id` int(9) NOT NULL auto_increment, + `name` varchar(64) NOT NULL, + `count` int(10) unsigned NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + UNIQUE KEY(`name`)) + ENGINE=InnoDB DEFAULT CHARSET=utf8;"); $db->query("CREATE TABLE IF NOT EXISTS `items_tags` ( - `id` int(9) NOT NULL auto_increment, - `item_id` int(9) NOT NULL, - `tag_id` int(9) NOT NULL, - PRIMARY KEY (`id`), - KEY(`tag_id`, `id`), - KEY(`item_id`, `id`)) - ENGINE=InnoDB DEFAULT CHARSET=utf8;"); + `id` int(9) NOT NULL auto_increment, + `item_id` int(9) NOT NULL, + `tag_id` int(9) NOT NULL, + PRIMARY KEY (`id`), + KEY(`tag_id`, `id`), + KEY(`item_id`, `id`)) + ENGINE=InnoDB DEFAULT CHARSET=utf8;"); module::set_version("tag", 1); } } |
