SQL: detection of updates, and preparation for better burge

https://github.com/FreshRSS/FreshRSS/issues/798
https://github.com/FreshRSS/FreshRSS/issues/493
SQLite not yet tested. Only MySQL tested so far.
This commit is contained in:
Alexandre Alapetite
2015-04-04 22:39:31 +02:00
parent 2a0d04dd0e
commit 711530a512
8 changed files with 233 additions and 103 deletions

View File

@@ -14,7 +14,7 @@ $SQL_CREATE_TABLES = array(
`name` varchar(255) NOT NULL,
`website` varchar(255),
`description` text,
`lastUpdate` int(11) DEFAULT 0,
`lastUpdate` int(11) DEFAULT 0, -- Until year 2038
`priority` tinyint(2) NOT NULL DEFAULT 10,
`pathEntries` varchar(511) DEFAULT NULL,
`httpAuth` varchar(511) DEFAULT NULL,
@@ -38,7 +38,9 @@ $SQL_CREATE_TABLES = array(
`author` varchar(255),
`content` text,
`link` varchar(1023) NOT NULL,
`date` int(11),
`date` int(11), -- Until year 2038
`lastSeen` INT(11) NOT NULL, -- v1.2, Until year 2038
`hash` BINARY(16), -- v1.2
`is_read` boolean NOT NULL DEFAULT 0,
`is_favorite` boolean NOT NULL DEFAULT 0,
`id_feed` SMALLINT,
@@ -50,6 +52,7 @@ $SQL_CREATE_TABLES = array(
'CREATE INDEX IF NOT EXISTS entry_is_favorite_index ON `%1$sentry`(`is_favorite`);',
'CREATE INDEX IF NOT EXISTS entry_is_read_index ON `%1$sentry`(`is_read`);',
'CREATE INDEX IF NOT EXISTS entry_lastSeen_index ON `%1$sentry`(`lastSeen`);', //v1.2
'INSERT OR IGNORE INTO `%1$scategory` (id, name) VALUES(1, "%2$s");',
);