1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
-- rss-kakapo: drop the 32-bit hash of an item's guid and link.
--
-- It identified a post in feed_posts and toots before the ledger
-- (feed_items, see create-08.sql), which identifies items by guid and by
-- link instead. What was left of its use went too: keeping a post from being
-- stored twice is done by publishing an item in one transaction that only
-- succeeds while the item is due (dal.PublishItem); and the first read of an
-- account from before the ledger compares links with the stored posts.
--
-- idx_120 was unique on (account_id, post_guid_hash); idx_121 takes over the
-- lookups it served by account (the web page's posts, newest first, and
-- their count).
DROP INDEX idx_120;
CREATE INDEX idx_121 ON feed_posts (account_id, post_time);
ALTER TABLE feed_posts DROP COLUMN post_guid_hash;
ALTER TABLE toots DROP COLUMN post_guid_hash;
ALTER TABLE feed_items DROP COLUMN post_guid_hash;
|