ArlongParkScrapeAndInterface/execenv/refineDatabase.sql
2024-11-23 05:01:29 -05:00

20 lines
484 B
SQL

UPDATE subpost
SET hasreply = 'false';
UPDATE subpost
SET hasreply = 'true'
WHERE postid IN (SELECT DISTINCT replypostid
FROM subpost
WHERE isreply = 'true');
UPDATE SubPost SET CreationTime = strftime('%s', CreationTime);
UPDATE MacroPost SET CreationTime = strftime('%s', CreationTime);
CREATE VIRTUAL TABLE TextSearch USING fts5(
PostId,
NonQuotedText
);
INSERT INTO TextSearch select PostId, NonQuotedText from Subpost