Created
May 3, 2023 17:09
-
-
Save judell/57e9055bcc6f12b5c8a854acfad8a6a3 to your computer and use it in GitHub Desktop.
update-home-timeline
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with data as ( | |
select | |
account, | |
account_url, | |
content, | |
created_at, | |
display_name, | |
followers, | |
following, | |
id, | |
in_reply_to_account_id, | |
instance_qualified_account_url, | |
instance_qualified_reblog_url, | |
instance_qualified_url, | |
list_id, | |
query, | |
reblog, | |
reblog_content, | |
reblog_server, | |
reblog_username, | |
reblogs_count, | |
replies_count, | |
server, | |
status, | |
url, | |
username | |
from | |
mastodon_toot_home | |
limit 400 | |
) | |
insert into public.p_mastodon_home_timeline ( | |
account, | |
account_url, | |
content, | |
created_at, | |
display_name, | |
followers, | |
following, | |
id, | |
in_reply_to_account_id, | |
instance_qualified_account_url, | |
instance_qualified_reblog_url, | |
instance_qualified_url, | |
list_id, | |
query, | |
reblog, | |
reblog_content, | |
reblog_server, | |
reblog_username, | |
reblogs_count, | |
replies_count, | |
server, | |
status, | |
url, | |
username | |
) | |
select | |
* | |
from | |
data | |
where | |
id not in ( select t.id from public.p_mastodon_home_timeline t ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment