mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-05-13 07:22:39 +00:00
Compare commits
7 commits
18b28cffe1
...
7df7d170d0
Author | SHA1 | Date | |
---|---|---|---|
7df7d170d0 | |||
b459949f57 | |||
93f5df2d2a | |||
cf426493e1 | |||
e84e25d8fa | |||
d12cb68c19 | |||
83a8bb1630 |
28
Cargo.lock
generated
28
Cargo.lock
generated
|
@ -2582,13 +2582,13 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
|||
|
||||
[[package]]
|
||||
name = "lemmy_api"
|
||||
version = "0.19.4-beta.4"
|
||||
version = "0.19.4-beta.5"
|
||||
dependencies = [
|
||||
"activitypub_federation",
|
||||
"actix-web",
|
||||
"actix-web-httpauth",
|
||||
"anyhow",
|
||||
"base64 0.21.7",
|
||||
"base64 0.22.0",
|
||||
"bcrypt",
|
||||
"captcha",
|
||||
"chrono",
|
||||
|
@ -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",
|
||||
] }
|
||||
|
|
|
@ -36,8 +36,20 @@ pub async fn add_mod_to_community(
|
|||
let community = Community::read(&mut context.pool(), community_id)
|
||||
.await?
|
||||
.ok_or(LemmyErrorType::CouldntFindCommunity)?;
|
||||
|
||||
// If user is admin and community is remote, explicitly check that he is a
|
||||
// moderator. This is necessary because otherwise the action would be rejected
|
||||
// by the community's home instance.
|
||||
if local_user_view.local_user.admin && !community.local {
|
||||
Err(LemmyErrorType::NotAModerator)?
|
||||
let is_mod = CommunityModeratorView::is_community_moderator(
|
||||
&mut context.pool(),
|
||||
community.id,
|
||||
local_user_view.person.id,
|
||||
)
|
||||
.await?;
|
||||
if !is_mod {
|
||||
Err(LemmyErrorType::NotAModerator)?
|
||||
}
|
||||
}
|
||||
|
||||
// Update in local database
|
||||
|
|
|
@ -8,6 +8,6 @@
|
|||
"type": "Block",
|
||||
"removeData": true,
|
||||
"summary": "spam post",
|
||||
"expires": "2021-11-01T12:23:50.151874Z",
|
||||
"endTime": "2021-11-01T12:23:50.151874Z",
|
||||
"id": "http://enterprise.lemmy.ml/activities/block/5d42fffb-0903-4625-86d4-0b39bb344fc2"
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"type": "Block",
|
||||
"removeData": true,
|
||||
"summary": "spam post",
|
||||
"expires": "2021-11-01T12:23:50.151874Z",
|
||||
"endTime": "2021-11-01T12:23:50.151874Z",
|
||||
"id": "http://enterprise.lemmy.ml/activities/block/726f43ab-bd0e-4ab3-89c8-627e976f553c"
|
||||
},
|
||||
"cc": ["http://enterprise.lemmy.ml/c/main"],
|
||||
|
|
|
@ -71,7 +71,6 @@ impl BlockUser {
|
|||
&context.settings().get_protocol_and_hostname(),
|
||||
)?,
|
||||
audience,
|
||||
expires,
|
||||
end_time: expires,
|
||||
})
|
||||
}
|
||||
|
@ -150,7 +149,7 @@ impl ActivityHandler for BlockUser {
|
|||
#[tracing::instrument(skip_all)]
|
||||
async fn receive(self, context: &Data<LemmyContext>) -> LemmyResult<()> {
|
||||
insert_received_activity(&self.id, context).await?;
|
||||
let expires = self.expires.or(self.end_time).map(Into::into);
|
||||
let expires = self.end_time.map(Into::into);
|
||||
let mod_person = self.actor.dereference(context).await?;
|
||||
let blocked_person = self.object.dereference(context).await?;
|
||||
let target = self.target.dereference(context).await?;
|
||||
|
|
|
@ -98,7 +98,7 @@ impl ActivityHandler for UndoBlockUser {
|
|||
#[tracing::instrument(skip_all)]
|
||||
async fn receive(self, context: &Data<LemmyContext>) -> LemmyResult<()> {
|
||||
insert_received_activity(&self.id, context).await?;
|
||||
let expires = self.object.expires.or(self.object.end_time).map(Into::into);
|
||||
let expires = self.object.end_time.map(Into::into);
|
||||
let mod_person = self.actor.dereference(context).await?;
|
||||
let blocked_person = self.object.object.dereference(context).await?;
|
||||
match self.object.target.dereference(context).await? {
|
||||
|
|
|
@ -38,8 +38,6 @@ pub struct BlockUser {
|
|||
pub(crate) remove_data: Option<bool>,
|
||||
/// block reason, written to mod log
|
||||
pub(crate) summary: Option<String>,
|
||||
/// TODO: deprecated
|
||||
pub(crate) expires: Option<DateTime<Utc>>,
|
||||
pub(crate) end_time: Option<DateTime<Utc>>,
|
||||
}
|
||||
|
||||
|
|
|
@ -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