mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-05-12 23:12:39 +00:00
Compare commits
5 commits
611a81a311
...
4ae93192f4
Author | SHA1 | Date | |
---|---|---|---|
4ae93192f4 | |||
b459949f57 | |||
93f5df2d2a | |||
d97c956dd5 | |||
b277ea97a9 |
26
Cargo.lock
generated
26
Cargo.lock
generated
|
@ -2582,7 +2582,7 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
|||
|
||||
[[package]]
|
||||
name = "lemmy_api"
|
||||
version = "0.19.4-beta.4"
|
||||
version = "0.19.4-beta.5"
|
||||
dependencies = [
|
||||
"activitypub_federation",
|
||||
"actix-web",
|
||||
|
@ -2611,7 +2611,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "lemmy_api_common"
|
||||
version = "0.19.4-beta.4"
|
||||
version = "0.19.4-beta.5"
|
||||
dependencies = [
|
||||
"activitypub_federation",
|
||||
"actix-web",
|
||||
|
@ -2649,7 +2649,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "lemmy_api_crud"
|
||||
version = "0.19.4-beta.4"
|
||||
version = "0.19.4-beta.5"
|
||||
dependencies = [
|
||||
"accept-language",
|
||||
"activitypub_federation",
|
||||
|
@ -2672,7 +2672,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "lemmy_apub"
|
||||
version = "0.19.4-beta.4"
|
||||
version = "0.19.4-beta.5"
|
||||
dependencies = [
|
||||
"activitypub_federation",
|
||||
"actix-web",
|
||||
|
@ -2710,7 +2710,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "lemmy_db_perf"
|
||||
version = "0.19.4-beta.4"
|
||||
version = "0.19.4-beta.5"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"clap",
|
||||
|
@ -2725,7 +2725,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "lemmy_db_schema"
|
||||
version = "0.19.4-beta.4"
|
||||
version = "0.19.4-beta.5"
|
||||
dependencies = [
|
||||
"activitypub_federation",
|
||||
"anyhow",
|
||||
|
@ -2765,7 +2765,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "lemmy_db_views"
|
||||
version = "0.19.4-beta.4"
|
||||
version = "0.19.4-beta.5"
|
||||
dependencies = [
|
||||
"actix-web",
|
||||
"chrono",
|
||||
|
@ -2787,7 +2787,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "lemmy_db_views_actor"
|
||||
version = "0.19.4-beta.4"
|
||||
version = "0.19.4-beta.5"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"diesel",
|
||||
|
@ -2807,7 +2807,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "lemmy_db_views_moderator"
|
||||
version = "0.19.4-beta.4"
|
||||
version = "0.19.4-beta.5"
|
||||
dependencies = [
|
||||
"diesel",
|
||||
"diesel-async",
|
||||
|
@ -2819,7 +2819,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "lemmy_federate"
|
||||
version = "0.19.4-beta.4"
|
||||
version = "0.19.4-beta.5"
|
||||
dependencies = [
|
||||
"activitypub_federation",
|
||||
"anyhow",
|
||||
|
@ -2842,7 +2842,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "lemmy_routes"
|
||||
version = "0.19.4-beta.4"
|
||||
version = "0.19.4-beta.5"
|
||||
dependencies = [
|
||||
"activitypub_federation",
|
||||
"actix-web",
|
||||
|
@ -2867,7 +2867,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "lemmy_server"
|
||||
version = "0.19.4-beta.4"
|
||||
version = "0.19.4-beta.5"
|
||||
dependencies = [
|
||||
"activitypub_federation",
|
||||
"actix-cors",
|
||||
|
@ -2910,7 +2910,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "lemmy_utils"
|
||||
version = "0.19.4-beta.4"
|
||||
version = "0.19.4-beta.5"
|
||||
dependencies = [
|
||||
"actix-web",
|
||||
"anyhow",
|
||||
|
|
24
Cargo.toml
24
Cargo.toml
|
@ -1,5 +1,5 @@
|
|||
[workspace.package]
|
||||
version = "0.19.4-beta.4"
|
||||
version = "0.19.4-beta.5"
|
||||
edition = "2021"
|
||||
description = "A link aggregator for the fediverse"
|
||||
license = "AGPL-3.0"
|
||||
|
@ -88,17 +88,17 @@ unused_self = "deny"
|
|||
unwrap_used = "deny"
|
||||
|
||||
[workspace.dependencies]
|
||||
lemmy_api = { version = "=0.19.4-beta.4", path = "./crates/api" }
|
||||
lemmy_api_crud = { version = "=0.19.4-beta.4", path = "./crates/api_crud" }
|
||||
lemmy_apub = { version = "=0.19.4-beta.4", path = "./crates/apub" }
|
||||
lemmy_utils = { version = "=0.19.4-beta.4", path = "./crates/utils", default-features = false }
|
||||
lemmy_db_schema = { version = "=0.19.4-beta.4", path = "./crates/db_schema" }
|
||||
lemmy_api_common = { version = "=0.19.4-beta.4", path = "./crates/api_common" }
|
||||
lemmy_routes = { version = "=0.19.4-beta.4", path = "./crates/routes" }
|
||||
lemmy_db_views = { version = "=0.19.4-beta.4", path = "./crates/db_views" }
|
||||
lemmy_db_views_actor = { version = "=0.19.4-beta.4", path = "./crates/db_views_actor" }
|
||||
lemmy_db_views_moderator = { version = "=0.19.4-beta.4", path = "./crates/db_views_moderator" }
|
||||
lemmy_federate = { version = "=0.19.4-beta.4", path = "./crates/federate" }
|
||||
lemmy_api = { version = "=0.19.4-beta.5", path = "./crates/api" }
|
||||
lemmy_api_crud = { version = "=0.19.4-beta.5", path = "./crates/api_crud" }
|
||||
lemmy_apub = { version = "=0.19.4-beta.5", path = "./crates/apub" }
|
||||
lemmy_utils = { version = "=0.19.4-beta.5", path = "./crates/utils", default-features = false }
|
||||
lemmy_db_schema = { version = "=0.19.4-beta.5", path = "./crates/db_schema" }
|
||||
lemmy_api_common = { version = "=0.19.4-beta.5", path = "./crates/api_common" }
|
||||
lemmy_routes = { version = "=0.19.4-beta.5", path = "./crates/routes" }
|
||||
lemmy_db_views = { version = "=0.19.4-beta.5", path = "./crates/db_views" }
|
||||
lemmy_db_views_actor = { version = "=0.19.4-beta.5", path = "./crates/db_views_actor" }
|
||||
lemmy_db_views_moderator = { version = "=0.19.4-beta.5", path = "./crates/db_views_moderator" }
|
||||
lemmy_federate = { version = "=0.19.4-beta.5", path = "./crates/federate" }
|
||||
activitypub_federation = { version = "0.5.4", default-features = false, features = [
|
||||
"actix-web",
|
||||
] }
|
||||
|
|
22
crates/apub/assets/discourse/objects/group.json
Normal file
22
crates/apub/assets/discourse/objects/group.json
Normal file
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"id": "https://socialhub.activitypub.rocks/ap/actor/797217cf18c0e819dfafc52425590146",
|
||||
"type": "Group",
|
||||
"updated": "2024-04-05T12:49:51Z",
|
||||
"url": "https://socialhub.activitypub.rocks/c/meeting/threadiverse-wg/88",
|
||||
"name": "Threadiverse Working Group (SocialHub)",
|
||||
"inbox": "https://socialhub.activitypub.rocks/ap/actor/797217cf18c0e819dfafc52425590146/inbox",
|
||||
"outbox": "https://socialhub.activitypub.rocks/ap/actor/797217cf18c0e819dfafc52425590146/outbox",
|
||||
"followers": "https://socialhub.activitypub.rocks/ap/actor/797217cf18c0e819dfafc52425590146/followers",
|
||||
"preferredUsername": "threadiverse-wg",
|
||||
"publicKey": {
|
||||
"id": "https://socialhub.activitypub.rocks/ap/actor/797217cf18c0e819dfafc52425590146#main-key",
|
||||
"owner": "https://socialhub.activitypub.rocks/ap/actor/797217cf18c0e819dfafc52425590146",
|
||||
"publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApJi4iAcW6bPiHVCxT9p0\n8DVnrDDO4QtLNy7bpRFdMFifmmmXprsuAi9D2MSwbhH49V54HtIkxBpKd2IR/UD8\nmhMDY4CNI9FHpjqLw0wtkzxcqF9urSqhn0/vWX+9oxyhIgQS5KMiIkYDMJiAc691\niEcZ8LCran23xIGl6Dk54Nr3TqTMLcjDhzQYUJbxMrLq5/knWqOKG3IF5OxK+9ZZ\n1wxDF872eJTxJLkmpag+WYNtHzvB2SGTp8j5IF1/pZ9J1c3cpYfaeolTch/B/GQn\najCB4l27U52rIIObxJqFXSY8wHyd0aAmNmxzPZ7cduRlBDhmI40cAmnCV1YQPvpk\nDwIDAQAB\n-----END PUBLIC KEY-----\n"
|
||||
},
|
||||
"icon": {
|
||||
"type": "Image",
|
||||
"mediaType": "image/png",
|
||||
"url": "https://socialhub.activitypub.rocks/uploads/default/original/1X/8faac84234dc73d074dadaa2bcf24dc746b8647f.png"
|
||||
},
|
||||
"@context": "https://www.w3.org/ns/activitystreams"
|
||||
}
|
13
crates/apub/assets/discourse/objects/page.json
Normal file
13
crates/apub/assets/discourse/objects/page.json
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"id": "https://socialhub.activitypub.rocks/ap/object/1899f65c062200daec50a4c89ed76dc9",
|
||||
"type": "Note",
|
||||
"audience": "https://socialhub.activitypub.rocks/ap/actor/797217cf18c0e819dfafc52425590146",
|
||||
"published": "2024-04-13T14:36:19Z",
|
||||
"updated": "2024-04-13T14:36:19Z",
|
||||
"url": "https://socialhub.activitypub.rocks/t/our-next-meeting/4079/1",
|
||||
"attributedTo": "https://socialhub.activitypub.rocks/ap/actor/495843076e9e469fbd35ccf467ae9fb1",
|
||||
"name": "Our next meeting",
|
||||
"context": "https://socialhub.activitypub.rocks/ap/collection/8850f6e85b57c490da915a5dfbbd5045",
|
||||
"content": "<h3>Last Meeting</h3>\n<h4>Recording</h4>\n<a href=\"https://us06web.zoom.us/rec/share/4hGBTvgXJPlu8UkjkkxVARypNg5DH0eeaKlIBv71D4G3lokYyrCrg7cqBCJmL109.FsHYTZDlVvZXrgcn?startTime=1712254114000\">https://us06web.zoom.us/rec/share/4hGBTvgXJPlu8UkjkkxVARypNg5DH0eeaKlIBv71D4G3lokYyrCrg7cqBCJmL109.FsHYTZDlVvZXrgcn?startTime=1712254114000</a>\nPasscode: z+1*4pUB\n<h4>Minutes</h4>\nTo refresh your memory, you can read the minutes of last week's meeting <a href=\"https://community.nodebb.org/topic/17949/minutes…",
|
||||
"@context": "https://www.w3.org/ns/activitystreams"
|
||||
}
|
23
crates/apub/assets/discourse/objects/person.json
Normal file
23
crates/apub/assets/discourse/objects/person.json
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"id": "https://socialhub.activitypub.rocks/ap/actor/495843076e9e469fbd35ccf467ae9fb1",
|
||||
"type": "Person",
|
||||
"updated": "2024-01-15T12:27:03Z",
|
||||
"url": "https://socialhub.activitypub.rocks/u/angus",
|
||||
"name": "Angus McLeod",
|
||||
"inbox": "https://socialhub.activitypub.rocks/ap/actor/495843076e9e469fbd35ccf467ae9fb1/inbox",
|
||||
"outbox": "https://socialhub.activitypub.rocks/ap/actor/495843076e9e469fbd35ccf467ae9fb1/outbox",
|
||||
"sharedInbox": "https://socialhub.activitypub.rocks/ap/users/inbox",
|
||||
"followers": "https://socialhub.activitypub.rocks/ap/actor/495843076e9e469fbd35ccf467ae9fb1/followers",
|
||||
"preferredUsername": "angus",
|
||||
"publicKey": {
|
||||
"id": "https://socialhub.activitypub.rocks/ap/actor/495843076e9e469fbd35ccf467ae9fb1#main-key",
|
||||
"owner": "https://socialhub.activitypub.rocks/ap/actor/495843076e9e469fbd35ccf467ae9fb1",
|
||||
"publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3RpuFDuwXZzOeHO5fO2O\nHmP7Flc5JDXJ8OOEJYq5T/dzUKqREOF1ZT0WMww8/E3P6w+gfFsjzThraJb8nHuW\nP6798SUD35CWBclfhw9DapjVn99JyFcAWcH3b9fr6LYshc4y1BoeJagk1kcro2Dc\n+pX0vVXgNjwWnGfyucAgGIUWrNUjcvIvXmyVCBSQfXG3nCALV1JbI4KSgf/5KyBn\nza/QefaetxYiFV8wAisPKLsz3XQAaITsQmbSi+8gmwXt/9U808PK1KphCiClDOWg\noi0HPzJn0rn+mwFCfgNWenvribfeG40AHLG33OkWKvslufjifdWDCOcBYYzyCEV6\n+wIDAQAB\n-----END PUBLIC KEY-----\n"
|
||||
},
|
||||
"icon": {
|
||||
"type": "Image",
|
||||
"mediaType": "image/png",
|
||||
"url": "https://socialhub.activitypub.rocks/user_avatar/socialhub.activitypub.rocks/angus/96/2295_2.png"
|
||||
},
|
||||
"@context": "https://www.w3.org/ns/activitystreams"
|
||||
}
|
|
@ -190,4 +190,12 @@ mod tests {
|
|||
test_json::<Person>("assets/mobilizon/objects/person.json")?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_parse_object_discourse() -> LemmyResult<()> {
|
||||
test_json::<Group>("assets/discourse/objects/group.json")?;
|
||||
test_json::<Page>("assets/discourse/objects/page.json")?;
|
||||
test_json::<Person>("assets/discourse/objects/person.json")?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ pub struct Page {
|
|||
pub(crate) kind: PageType,
|
||||
pub(crate) id: ObjectId<ApubPost>,
|
||||
pub(crate) attributed_to: AttributedTo,
|
||||
#[serde(deserialize_with = "deserialize_one_or_many")]
|
||||
#[serde(deserialize_with = "deserialize_one_or_many", default)]
|
||||
pub(crate) to: Vec<Url>,
|
||||
// If there is inReplyTo field this is actually a comment and must not be parsed
|
||||
#[serde(deserialize_with = "deserialize_not_present", default)]
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit c88dd1e3b36ee1617f1b86acf94c1b7946e97cd4
|
||||
Subproject commit 866e4056656755f7b31e20094b46391e6931e3e7
|
120
migrations/2024-04-23-020604_add_post_id_index/down.sql
Normal file
120
migrations/2024-04-23-020604_add_post_id_index/down.sql
Normal file
|
@ -0,0 +1,120 @@
|
|||
DROP INDEX idx_post_aggregates_community_active;
|
||||
|
||||
DROP INDEX idx_post_aggregates_community_controversy;
|
||||
|
||||
DROP INDEX idx_post_aggregates_community_hot;
|
||||
|
||||
DROP INDEX idx_post_aggregates_community_most_comments;
|
||||
|
||||
DROP INDEX idx_post_aggregates_community_newest_comment_time;
|
||||
|
||||
DROP INDEX idx_post_aggregates_community_newest_comment_time_necro;
|
||||
|
||||
DROP INDEX idx_post_aggregates_community_published;
|
||||
|
||||
DROP INDEX idx_post_aggregates_community_published_asc;
|
||||
|
||||
DROP INDEX idx_post_aggregates_community_scaled;
|
||||
|
||||
DROP INDEX idx_post_aggregates_community_score;
|
||||
|
||||
DROP INDEX idx_post_aggregates_featured_community_active;
|
||||
|
||||
DROP INDEX idx_post_aggregates_featured_community_controversy;
|
||||
|
||||
DROP INDEX idx_post_aggregates_featured_community_hot;
|
||||
|
||||
DROP INDEX idx_post_aggregates_featured_community_most_comments;
|
||||
|
||||
DROP INDEX idx_post_aggregates_featured_community_newest_comment_time;
|
||||
|
||||
DROP INDEX idx_post_aggregates_featured_community_newest_comment_time_necr;
|
||||
|
||||
DROP INDEX idx_post_aggregates_featured_community_published;
|
||||
|
||||
DROP INDEX idx_post_aggregates_featured_community_published_asc;
|
||||
|
||||
DROP INDEX idx_post_aggregates_featured_community_scaled;
|
||||
|
||||
DROP INDEX idx_post_aggregates_featured_community_score;
|
||||
|
||||
DROP INDEX idx_post_aggregates_featured_local_active;
|
||||
|
||||
DROP INDEX idx_post_aggregates_featured_local_controversy;
|
||||
|
||||
DROP INDEX idx_post_aggregates_featured_local_hot;
|
||||
|
||||
DROP INDEX idx_post_aggregates_featured_local_most_comments;
|
||||
|
||||
DROP INDEX idx_post_aggregates_featured_local_newest_comment_time;
|
||||
|
||||
DROP INDEX idx_post_aggregates_featured_local_newest_comment_time_necro;
|
||||
|
||||
DROP INDEX idx_post_aggregates_featured_local_published;
|
||||
|
||||
DROP INDEX idx_post_aggregates_featured_local_published_asc;
|
||||
|
||||
DROP INDEX idx_post_aggregates_featured_local_scaled;
|
||||
|
||||
DROP INDEX idx_post_aggregates_featured_local_score;
|
||||
|
||||
CREATE INDEX idx_post_aggregates_community_active ON public.post_aggregates USING btree (community_id, featured_local DESC, hot_rank_active DESC, published DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_community_controversy ON public.post_aggregates USING btree (community_id, featured_local DESC, controversy_rank DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_community_hot ON public.post_aggregates USING btree (community_id, featured_local DESC, hot_rank DESC, published DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_community_most_comments ON public.post_aggregates USING btree (community_id, featured_local DESC, comments DESC, published DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_community_newest_comment_time ON public.post_aggregates USING btree (community_id, featured_local DESC, newest_comment_time DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_community_newest_comment_time_necro ON public.post_aggregates USING btree (community_id, featured_local DESC, newest_comment_time_necro DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_community_published ON public.post_aggregates USING btree (community_id, featured_local DESC, published DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_community_published_asc ON public.post_aggregates USING btree (community_id, featured_local DESC, public.reverse_timestamp_sort (published) DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_community_scaled ON public.post_aggregates USING btree (community_id, featured_local DESC, scaled_rank DESC, published DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_community_score ON public.post_aggregates USING btree (community_id, featured_local DESC, score DESC, published DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_featured_community_active ON public.post_aggregates USING btree (community_id, featured_community DESC, hot_rank_active DESC, published DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_featured_community_controversy ON public.post_aggregates USING btree (community_id, featured_community DESC, controversy_rank DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_featured_community_hot ON public.post_aggregates USING btree (community_id, featured_community DESC, hot_rank DESC, published DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_featured_community_most_comments ON public.post_aggregates USING btree (community_id, featured_community DESC, comments DESC, published DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_featured_community_newest_comment_time ON public.post_aggregates USING btree (community_id, featured_community DESC, newest_comment_time DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_featured_community_newest_comment_time_necr ON public.post_aggregates USING btree (community_id, featured_community DESC, newest_comment_time_necro DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_featured_community_published ON public.post_aggregates USING btree (community_id, featured_community DESC, published DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_featured_community_published_asc ON public.post_aggregates USING btree (community_id, featured_community DESC, public.reverse_timestamp_sort (published) DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_featured_community_scaled ON public.post_aggregates USING btree (community_id, featured_community DESC, scaled_rank DESC, published DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_featured_community_score ON public.post_aggregates USING btree (community_id, featured_community DESC, score DESC, published DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_featured_local_active ON public.post_aggregates USING btree (featured_local DESC, hot_rank_active DESC, published DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_featured_local_controversy ON public.post_aggregates USING btree (featured_local DESC, controversy_rank DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_featured_local_hot ON public.post_aggregates USING btree (featured_local DESC, hot_rank DESC, published DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_featured_local_most_comments ON public.post_aggregates USING btree (featured_local DESC, comments DESC, published DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_featured_local_newest_comment_time ON public.post_aggregates USING btree (featured_local DESC, newest_comment_time DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_featured_local_newest_comment_time_necro ON public.post_aggregates USING btree (featured_local DESC, newest_comment_time_necro DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_featured_local_published ON public.post_aggregates USING btree (featured_local DESC, published DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_featured_local_published_asc ON public.post_aggregates USING btree (featured_local DESC, public.reverse_timestamp_sort (published) DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_featured_local_scaled ON public.post_aggregates USING btree (featured_local DESC, scaled_rank DESC, published DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_featured_local_score ON public.post_aggregates USING btree (featured_local DESC, score DESC, published DESC);
|
||||
|
121
migrations/2024-04-23-020604_add_post_id_index/up.sql
Normal file
121
migrations/2024-04-23-020604_add_post_id_index/up.sql
Normal file
|
@ -0,0 +1,121 @@
|
|||
-- Add , post_id DESC to all these
|
||||
DROP INDEX idx_post_aggregates_community_active;
|
||||
|
||||
DROP INDEX idx_post_aggregates_community_controversy;
|
||||
|
||||
DROP INDEX idx_post_aggregates_community_hot;
|
||||
|
||||
DROP INDEX idx_post_aggregates_community_most_comments;
|
||||
|
||||
DROP INDEX idx_post_aggregates_community_newest_comment_time;
|
||||
|
||||
DROP INDEX idx_post_aggregates_community_newest_comment_time_necro;
|
||||
|
||||
DROP INDEX idx_post_aggregates_community_published;
|
||||
|
||||
DROP INDEX idx_post_aggregates_community_published_asc;
|
||||
|
||||
DROP INDEX idx_post_aggregates_community_scaled;
|
||||
|
||||
DROP INDEX idx_post_aggregates_community_score;
|
||||
|
||||
DROP INDEX idx_post_aggregates_featured_community_active;
|
||||
|
||||
DROP INDEX idx_post_aggregates_featured_community_controversy;
|
||||
|
||||
DROP INDEX idx_post_aggregates_featured_community_hot;
|
||||
|
||||
DROP INDEX idx_post_aggregates_featured_community_most_comments;
|
||||
|
||||
DROP INDEX idx_post_aggregates_featured_community_newest_comment_time;
|
||||
|
||||
DROP INDEX idx_post_aggregates_featured_community_newest_comment_time_necr;
|
||||
|
||||
DROP INDEX idx_post_aggregates_featured_community_published;
|
||||
|
||||
DROP INDEX idx_post_aggregates_featured_community_published_asc;
|
||||
|
||||
DROP INDEX idx_post_aggregates_featured_community_scaled;
|
||||
|
||||
DROP INDEX idx_post_aggregates_featured_community_score;
|
||||
|
||||
DROP INDEX idx_post_aggregates_featured_local_active;
|
||||
|
||||
DROP INDEX idx_post_aggregates_featured_local_controversy;
|
||||
|
||||
DROP INDEX idx_post_aggregates_featured_local_hot;
|
||||
|
||||
DROP INDEX idx_post_aggregates_featured_local_most_comments;
|
||||
|
||||
DROP INDEX idx_post_aggregates_featured_local_newest_comment_time;
|
||||
|
||||
DROP INDEX idx_post_aggregates_featured_local_newest_comment_time_necro;
|
||||
|
||||
DROP INDEX idx_post_aggregates_featured_local_published;
|
||||
|
||||
DROP INDEX idx_post_aggregates_featured_local_published_asc;
|
||||
|
||||
DROP INDEX idx_post_aggregates_featured_local_scaled;
|
||||
|
||||
DROP INDEX idx_post_aggregates_featured_local_score;
|
||||
|
||||
CREATE INDEX idx_post_aggregates_community_active ON public.post_aggregates USING btree (community_id, featured_local DESC, hot_rank_active DESC, published DESC, post_id DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_community_controversy ON public.post_aggregates USING btree (community_id, featured_local DESC, controversy_rank DESC, post_id DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_community_hot ON public.post_aggregates USING btree (community_id, featured_local DESC, hot_rank DESC, published DESC, post_id DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_community_most_comments ON public.post_aggregates USING btree (community_id, featured_local DESC, comments DESC, published DESC, post_id DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_community_newest_comment_time ON public.post_aggregates USING btree (community_id, featured_local DESC, newest_comment_time DESC, post_id DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_community_newest_comment_time_necro ON public.post_aggregates USING btree (community_id, featured_local DESC, newest_comment_time_necro DESC, post_id DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_community_published ON public.post_aggregates USING btree (community_id, featured_local DESC, published DESC, post_id DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_community_published_asc ON public.post_aggregates USING btree (community_id, featured_local DESC, public.reverse_timestamp_sort (published) DESC, post_id DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_community_scaled ON public.post_aggregates USING btree (community_id, featured_local DESC, scaled_rank DESC, published DESC, post_id DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_community_score ON public.post_aggregates USING btree (community_id, featured_local DESC, score DESC, published DESC, post_id DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_featured_community_active ON public.post_aggregates USING btree (community_id, featured_community DESC, hot_rank_active DESC, published DESC, post_id DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_featured_community_controversy ON public.post_aggregates USING btree (community_id, featured_community DESC, controversy_rank DESC, post_id DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_featured_community_hot ON public.post_aggregates USING btree (community_id, featured_community DESC, hot_rank DESC, published DESC, post_id DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_featured_community_most_comments ON public.post_aggregates USING btree (community_id, featured_community DESC, comments DESC, published DESC, post_id DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_featured_community_newest_comment_time ON public.post_aggregates USING btree (community_id, featured_community DESC, newest_comment_time DESC, post_id DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_featured_community_newest_comment_time_necr ON public.post_aggregates USING btree (community_id, featured_community DESC, newest_comment_time_necro DESC, post_id DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_featured_community_published ON public.post_aggregates USING btree (community_id, featured_community DESC, published DESC, post_id DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_featured_community_published_asc ON public.post_aggregates USING btree (community_id, featured_community DESC, public.reverse_timestamp_sort (published) DESC, post_id DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_featured_community_scaled ON public.post_aggregates USING btree (community_id, featured_community DESC, scaled_rank DESC, published DESC, post_id DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_featured_community_score ON public.post_aggregates USING btree (community_id, featured_community DESC, score DESC, published DESC, post_id DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_featured_local_active ON public.post_aggregates USING btree (featured_local DESC, hot_rank_active DESC, published DESC, post_id DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_featured_local_controversy ON public.post_aggregates USING btree (featured_local DESC, controversy_rank DESC, post_id DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_featured_local_hot ON public.post_aggregates USING btree (featured_local DESC, hot_rank DESC, published DESC, post_id DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_featured_local_most_comments ON public.post_aggregates USING btree (featured_local DESC, comments DESC, published DESC, post_id DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_featured_local_newest_comment_time ON public.post_aggregates USING btree (featured_local DESC, newest_comment_time DESC, post_id DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_featured_local_newest_comment_time_necro ON public.post_aggregates USING btree (featured_local DESC, newest_comment_time_necro DESC, post_id DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_featured_local_published ON public.post_aggregates USING btree (featured_local DESC, published DESC, post_id DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_featured_local_published_asc ON public.post_aggregates USING btree (featured_local DESC, public.reverse_timestamp_sort (published) DESC, post_id DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_featured_local_scaled ON public.post_aggregates USING btree (featured_local DESC, scaled_rank DESC, published DESC, post_id DESC);
|
||||
|
||||
CREATE INDEX idx_post_aggregates_featured_local_score ON public.post_aggregates USING btree (featured_local DESC, score DESC, published DESC, post_id DESC);
|
||||
|
Loading…
Reference in a new issue