summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2020-04-11 06:51:00 +0300
committerAndrew Dolgov <[email protected]>2020-04-11 06:51:00 +0300
commit7ad00753039640d22bedde34b74483d2ef1a3c90 (patch)
treee0a2ce64aae6800fbe8899fa7d288be11ad83c96
parenta3e78474d0084812ca50cf62cb792c186e59f1ca (diff)
migrate unread status of articles
-rw-r--r--init.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/init.php b/init.php
index 61635e1..7b17893 100644
--- a/init.php
+++ b/init.php
@@ -189,6 +189,7 @@ class Data_Migration extends Plugin {
tag_cache,
label_cache,
author,
+ unread,
ttrss_feeds.title AS feed_title,
ttrss_feeds.feed_url AS feed_url,
ttrss_entries.updated
@@ -330,7 +331,7 @@ class Data_Migration extends Plugin {
"INSERT INTO ttrss_user_entries
(ref_id, owner_uid, feed_id, unread, last_read,
marked, published, score, tag_cache, label_cache, uuid, note)
- VALUES (:ref_id, :owner_uid, :feed_id, false, NULL,
+ VALUES (:ref_id, :owner_uid, :feed_id, :unread, NULL,
:marked, :published, :score, :tag_cache, '', '', :note)");
$res = $sth->execute([
@@ -339,6 +340,7 @@ class Data_Migration extends Plugin {
"feed_id" => $feed,
"marked" => (int)sql_bool_to_bool($article['marked']),
"published" => (int)sql_bool_to_bool($article['published']),
+ "unread" => (int)sql_bool_to_bool($article['unread']),
"score" => $score,
"tag_cache" => $tag_cache,
"note" => $note]);