summaryrefslogtreecommitdiff
path: root/public/install.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-11-30 13:15:54 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-11-30 13:15:54 +0100
commite98b7ab13ec414d1c5c3c3d1d6a7c9995ebf4fea (patch)
tree3617c9fc2eb4e05b52a3ab8114369802ce288dfa /public/install.php
parentae09cbec4237c903b8c83c0dc5cc8051195c030a (diff)
SQL : compression côté base de données (attention, perte de compatibilité)
Ça y est, j'ai tout cassé... Contribue à https://github.com/marienfressinaud/FreshRSS/issues/204 Compatible MySQL 5.0. Commentaires souhaités avant l'implémentation de la recherche côté base de données. Pour l'instant, je n'ai pas fait de script de mise à jour, car la manière précédente `base64_encode(gzdeflate(serialize($content)))` est difficile à traiter côté MySQL et nécessite une boucle en PHP. Avec la nouvelle approche de ce patch, nous pourrons plus facilement changer d'avis sans perte de compatibilité.
Diffstat (limited to 'public/install.php')
-rw-r--r--public/install.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/public/install.php b/public/install.php
index 764d152f5..0701c8c1f 100644
--- a/public/install.php
+++ b/public/install.php
@@ -18,7 +18,8 @@ define ('SQL_REQ_CAT', 'CREATE TABLE IF NOT EXISTS `%scategory` (
`color` char(7) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY (`name`) -- v0.7
-) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;');
+) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci
+ENGINE = INNODB;');
define ('SQL_REQ_FEED', 'CREATE TABLE IF NOT EXISTS `%sfeed` (
`id` SMALLINT NOT NULL AUTO_INCREMENT, -- v0.7
@@ -41,14 +42,15 @@ define ('SQL_REQ_FEED', 'CREATE TABLE IF NOT EXISTS `%sfeed` (
INDEX (`name`), -- v0.7
INDEX (`priority`), -- v0.7
INDEX (`keep_history`) -- v0.7
-) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;');
+) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci
+ENGINE = INNODB;');
define ('SQL_REQ_ENTRY', 'CREATE TABLE IF NOT EXISTS `%sentry` (
`id` bigint NOT NULL, -- v0.7
`guid` varchar(760) CHARACTER SET latin1 NOT NULL, -- Maximum for UNIQUE is 767B
`title` varchar(255) NOT NULL,
`author` varchar(255) NOT NULL,
- `content` text NOT NULL,
+ `content_bin` blob NOT NULL, -- v0.7
`link` varchar(1023) CHARACTER SET latin1 NOT NULL,
`date` int(11) NOT NULL,
`is_read` boolean NOT NULL DEFAULT 0,
@@ -59,8 +61,9 @@ define ('SQL_REQ_ENTRY', 'CREATE TABLE IF NOT EXISTS `%sentry` (
FOREIGN KEY (`id_feed`) REFERENCES `%sfeed`(`id`) ON DELETE CASCADE ON UPDATE CASCADE,
UNIQUE KEY (`id_feed`,`guid`), -- v0.7
INDEX (`is_favorite`), -- v0.7
- INDEX (`is_read`) -- v0.7
-) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;');
+ INDEX (`is_read`), -- v0.7
+) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci
+ENGINE = INNODB;');
function writeLine ($f, $line) {