diff options
| author | 2013-11-11 20:55:25 +0100 | |
|---|---|---|
| committer | 2013-11-11 20:55:25 +0100 | |
| commit | b8821e6b3f94b77033441c193f9e6ea873a2e280 (patch) | |
| tree | 5a6c288e6d4d0c68766711e66d37ec09d5e7deab /public/install.php | |
| parent | a664b85372770155e2d9c4b500194f050a0c1685 (diff) | |
MySQL : Index et changements mineurs de types
Légers changements qui ne devraient pas perturber le fonctionnement.
Début de contribution à
https://github.com/marienfressinaud/FreshRSS/issues/254 et
https://github.com/marienfressinaud/FreshRSS/issues/258
Diffstat (limited to 'public/install.php')
| -rw-r--r-- | public/install.php | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/public/install.php b/public/install.php index 0c39a031e..ec7d50fbd 100644 --- a/public/install.php +++ b/public/install.php @@ -14,7 +14,8 @@ define ('SQL_REQ_CAT', 'CREATE TABLE IF NOT EXISTS `%scategory` ( `id` varchar(6) NOT NULL, `name` varchar(255) NOT NULL, `color` varchar(7) NOT NULL, - PRIMARY KEY (`id`) + PRIMARY KEY (`id`), + INDEX (`name`) );'); define ('SQL_REQ_FEED', 'CREATE TABLE IF NOT EXISTS `%sfeed` ( @@ -25,13 +26,16 @@ define ('SQL_REQ_FEED', 'CREATE TABLE IF NOT EXISTS `%sfeed` ( `website` text NOT NULL, `description` text NOT NULL, `lastUpdate` int(11) NOT NULL, - `priority` int(2) NOT NULL DEFAULT \'10\', + `priority` tinyint NOT NULL DEFAULT \'10\', `pathEntries` varchar(500) DEFAULT NULL, `httpAuth` varchar(500) DEFAULT NULL, - `error` int(1) NOT NULL DEFAULT \'0\', - `keep_history` int(1) NOT NULL DEFAULT \'0\', + `error` boolean NOT NULL DEFAULT \'0\', + `keep_history` boolean NOT NULL DEFAULT \'0\', PRIMARY KEY (`id`), - FOREIGN KEY (`category`) REFERENCES %scategory(id) ON DELETE SET NULL ON UPDATE CASCADE + FOREIGN KEY (`category`) REFERENCES %scategory(id) ON DELETE SET NULL ON UPDATE CASCADE, + INDEX (`name`), + INDEX (`priority`), + INDEX (`keep_history`) );'); define ('SQL_REQ_ENTRY', 'CREATE TABLE IF NOT EXISTS `%sentry` ( @@ -42,12 +46,14 @@ define ('SQL_REQ_ENTRY', 'CREATE TABLE IF NOT EXISTS `%sentry` ( `content` text NOT NULL, `link` text NOT NULL, `date` int(11) NOT NULL, - `is_read` int(11) NOT NULL DEFAULT \'0\', - `is_favorite` int(11) NOT NULL DEFAULT \'0\', + `is_read` boolean NOT NULL DEFAULT \'0\', + `is_favorite` boolean NOT NULL DEFAULT \'0\', `id_feed` varchar(6) NOT NULL, `tags` text NOT NULL, PRIMARY KEY (`id`), - FOREIGN KEY (`id_feed`) REFERENCES %sfeed(id) ON DELETE CASCADE ON UPDATE CASCADE + FOREIGN KEY (`id_feed`) REFERENCES %sfeed(id) ON DELETE CASCADE ON UPDATE CASCADE, + INDEX (`is_favorite`), + INDEX (`is_read`) );'); |
