mirror of
https://github.com/LemmyNet/lemmy.git
synced 2025-02-02 15:21:40 +00:00
Adding person_aggregates.published column.
This commit is contained in:
parent
99461d594b
commit
f1a8264091
2 changed files with 16 additions and 0 deletions
|
@ -1,2 +1,5 @@
|
||||||
|
ALTER TABLE person_aggregates
|
||||||
|
DROP COLUMN published;
|
||||||
|
|
||||||
DROP TABLE search_combined;
|
DROP TABLE search_combined;
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,19 @@ CREATE INDEX idx_search_combined_published_asc ON search_combined (reverse_times
|
||||||
|
|
||||||
CREATE INDEX idx_search_combined_score ON search_combined (score DESC, id DESC);
|
CREATE INDEX idx_search_combined_score ON search_combined (score DESC, id DESC);
|
||||||
|
|
||||||
|
-- Add published to person_aggregates (it was missing for some reason)
|
||||||
|
ALTER TABLE person_aggregates
|
||||||
|
ADD COLUMN published timestamptz NOT NULL DEFAULT now();
|
||||||
|
|
||||||
|
UPDATE
|
||||||
|
person_aggregates pa
|
||||||
|
SET
|
||||||
|
published = p.published
|
||||||
|
FROM
|
||||||
|
person p
|
||||||
|
WHERE
|
||||||
|
pa.person_id = p.id;
|
||||||
|
|
||||||
-- Updating the history
|
-- Updating the history
|
||||||
INSERT INTO search_combined (published, score, post_id, comment_id, community_id, person_id)
|
INSERT INTO search_combined (published, score, post_id, comment_id, community_id, person_id)
|
||||||
SELECT
|
SELECT
|
||||||
|
|
Loading…
Reference in a new issue