2023-04-17 19:19:51 +00:00
|
|
|
// @generated automatically by Diesel CLI.
|
|
|
|
|
|
|
|
pub mod sql_types {
|
2023-09-09 16:25:03 +00:00
|
|
|
#[derive(diesel::sql_types::SqlType)]
|
|
|
|
#[diesel(postgres_type(name = "actor_type_enum"))]
|
|
|
|
pub struct ActorTypeEnum;
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
#[derive(diesel::sql_types::SqlType)]
|
|
|
|
#[diesel(postgres_type(name = "listing_type_enum"))]
|
|
|
|
pub struct ListingTypeEnum;
|
|
|
|
|
2023-08-31 13:01:08 +00:00
|
|
|
#[derive(diesel::sql_types::SqlType)]
|
|
|
|
#[diesel(postgres_type(name = "ltree"))]
|
|
|
|
pub struct Ltree;
|
|
|
|
|
|
|
|
#[derive(diesel::sql_types::SqlType)]
|
|
|
|
#[diesel(postgres_type(name = "post_listing_mode_enum"))]
|
|
|
|
pub struct PostListingModeEnum;
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
#[derive(diesel::sql_types::SqlType)]
|
|
|
|
#[diesel(postgres_type(name = "registration_mode_enum"))]
|
|
|
|
pub struct RegistrationModeEnum;
|
|
|
|
|
|
|
|
#[derive(diesel::sql_types::SqlType)]
|
|
|
|
#[diesel(postgres_type(name = "sort_type_enum"))]
|
|
|
|
pub struct SortTypeEnum;
|
|
|
|
}
|
|
|
|
|
|
|
|
diesel::table! {
|
|
|
|
admin_purge_comment (id) {
|
|
|
|
id -> Int4,
|
|
|
|
admin_person_id -> Int4,
|
|
|
|
post_id -> Int4,
|
|
|
|
reason -> Nullable<Text>,
|
2023-08-24 15:27:00 +00:00
|
|
|
when_ -> Timestamptz,
|
2023-04-17 19:19:51 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
diesel::table! {
|
|
|
|
admin_purge_community (id) {
|
|
|
|
id -> Int4,
|
|
|
|
admin_person_id -> Int4,
|
|
|
|
reason -> Nullable<Text>,
|
2023-08-24 15:27:00 +00:00
|
|
|
when_ -> Timestamptz,
|
2020-05-06 02:06:24 +00:00
|
|
|
}
|
2019-04-03 20:59:37 +00:00
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::table! {
|
|
|
|
admin_purge_person (id) {
|
|
|
|
id -> Int4,
|
|
|
|
admin_person_id -> Int4,
|
|
|
|
reason -> Nullable<Text>,
|
2023-08-24 15:27:00 +00:00
|
|
|
when_ -> Timestamptz,
|
2023-04-17 19:19:51 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
diesel::table! {
|
|
|
|
admin_purge_post (id) {
|
|
|
|
id -> Int4,
|
|
|
|
admin_person_id -> Int4,
|
|
|
|
community_id -> Int4,
|
|
|
|
reason -> Nullable<Text>,
|
2023-08-24 15:27:00 +00:00
|
|
|
when_ -> Timestamptz,
|
2023-04-17 19:19:51 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-06-27 10:38:53 +00:00
|
|
|
diesel::table! {
|
Remove id column and use different primary key on some tables (#4093)
* post_saved
* fmt
* remove unique and not null
* put person_id first in primary key and remove index
* use post_saved.find
* change captcha_answer
* remove removal of not null
* comment_aggregates
* comment_like
* comment_saved
* aggregates
* remove "\"
* deduplicate site_aggregates
* person_post_aggregates
* community_moderator
* community_block
* community_person_ban
* custom_emoji_keyword
* federation allow/block list
* federation_queue_state
* instance_block
* local_site_rate_limit, local_user_language, login_token
* person_ban, person_block, person_follower, post_like, post_read, received_activity
* community_follower, community_language, site_language
* fmt
* image_upload
* remove unused newtypes
* remove more indexes
* use .find
* merge
* fix site_aggregates_site function
* fmt
* Primary keys dess (#17)
* Also order reports by oldest first (ref #4123) (#4129)
* Support signed fetch for federation (fixes #868) (#4125)
* Support signed fetch for federation (fixes #868)
* taplo
* add federation queue state to get_federated_instances api (#4104)
* add federation queue state to get_federated_instances api
* feature gate
* move retry sleep function
* move stuff around
* Add UI setting for collapsing bot comments. Fixes #3838 (#4098)
* Add UI setting for collapsing bot comments. Fixes #3838
* Fixing clippy check.
* Only keep sent and received activities for 7 days (fixes #4113, fixes #4110) (#4131)
* Only check auth secure on release mode. (#4127)
* Only check auth secure on release mode.
* Fixing wrong js-client.
* Adding is_debug_mode var.
* Fixing the desktop image on the README. (#4135)
* Delete dupes and add possibly missing unique constraint on person_aggregates.
* Fixing clippy lints.
---------
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
* fmt
* Update community_block.rs
* Update instance_block.rs
* Update person_block.rs
* Update person_block.rs
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
2023-11-13 13:14:07 +00:00
|
|
|
captcha_answer (uuid) {
|
2023-06-27 10:38:53 +00:00
|
|
|
uuid -> Uuid,
|
|
|
|
answer -> Text,
|
2023-08-24 15:27:00 +00:00
|
|
|
published -> Timestamptz,
|
2023-06-27 10:38:53 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::table! {
|
2023-06-26 09:18:29 +00:00
|
|
|
use diesel::sql_types::*;
|
2023-04-17 19:19:51 +00:00
|
|
|
use diesel_ltree::sql_types::Ltree;
|
2022-07-30 03:55:59 +00:00
|
|
|
|
2020-05-06 02:06:24 +00:00
|
|
|
comment (id) {
|
|
|
|
id -> Int4,
|
|
|
|
creator_id -> Int4,
|
|
|
|
post_id -> Int4,
|
|
|
|
content -> Text,
|
|
|
|
removed -> Bool,
|
2023-08-24 15:27:00 +00:00
|
|
|
published -> Timestamptz,
|
|
|
|
updated -> Nullable<Timestamptz>,
|
2020-05-06 02:06:24 +00:00
|
|
|
deleted -> Bool,
|
2023-06-07 10:54:40 +00:00
|
|
|
#[max_length = 255]
|
2020-05-06 02:06:24 +00:00
|
|
|
ap_id -> Varchar,
|
|
|
|
local -> Bool,
|
2022-07-30 03:55:59 +00:00
|
|
|
path -> Ltree,
|
2022-08-17 11:38:52 +00:00
|
|
|
distinguished -> Bool,
|
2022-08-22 20:55:10 +00:00
|
|
|
language_id -> Int4,
|
2020-05-06 02:06:24 +00:00
|
|
|
}
|
2019-03-06 01:00:01 +00:00
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::table! {
|
Remove id column and use different primary key on some tables (#4093)
* post_saved
* fmt
* remove unique and not null
* put person_id first in primary key and remove index
* use post_saved.find
* change captcha_answer
* remove removal of not null
* comment_aggregates
* comment_like
* comment_saved
* aggregates
* remove "\"
* deduplicate site_aggregates
* person_post_aggregates
* community_moderator
* community_block
* community_person_ban
* custom_emoji_keyword
* federation allow/block list
* federation_queue_state
* instance_block
* local_site_rate_limit, local_user_language, login_token
* person_ban, person_block, person_follower, post_like, post_read, received_activity
* community_follower, community_language, site_language
* fmt
* image_upload
* remove unused newtypes
* remove more indexes
* use .find
* merge
* fix site_aggregates_site function
* fmt
* Primary keys dess (#17)
* Also order reports by oldest first (ref #4123) (#4129)
* Support signed fetch for federation (fixes #868) (#4125)
* Support signed fetch for federation (fixes #868)
* taplo
* add federation queue state to get_federated_instances api (#4104)
* add federation queue state to get_federated_instances api
* feature gate
* move retry sleep function
* move stuff around
* Add UI setting for collapsing bot comments. Fixes #3838 (#4098)
* Add UI setting for collapsing bot comments. Fixes #3838
* Fixing clippy check.
* Only keep sent and received activities for 7 days (fixes #4113, fixes #4110) (#4131)
* Only check auth secure on release mode. (#4127)
* Only check auth secure on release mode.
* Fixing wrong js-client.
* Adding is_debug_mode var.
* Fixing the desktop image on the README. (#4135)
* Delete dupes and add possibly missing unique constraint on person_aggregates.
* Fixing clippy lints.
---------
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
* fmt
* Update community_block.rs
* Update instance_block.rs
* Update person_block.rs
* Update person_block.rs
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
2023-11-13 13:14:07 +00:00
|
|
|
comment_aggregates (comment_id) {
|
2020-12-15 15:28:25 +00:00
|
|
|
comment_id -> Int4,
|
|
|
|
score -> Int8,
|
|
|
|
upvotes -> Int8,
|
|
|
|
downvotes -> Int8,
|
2023-08-24 15:27:00 +00:00
|
|
|
published -> Timestamptz,
|
2023-04-17 19:19:51 +00:00
|
|
|
child_count -> Int4,
|
2023-09-06 17:43:27 +00:00
|
|
|
hot_rank -> Float8,
|
2023-07-26 17:07:05 +00:00
|
|
|
controversy_rank -> Float8,
|
2020-12-15 15:28:25 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::table! {
|
Remove id column and use different primary key on some tables (#4093)
* post_saved
* fmt
* remove unique and not null
* put person_id first in primary key and remove index
* use post_saved.find
* change captcha_answer
* remove removal of not null
* comment_aggregates
* comment_like
* comment_saved
* aggregates
* remove "\"
* deduplicate site_aggregates
* person_post_aggregates
* community_moderator
* community_block
* community_person_ban
* custom_emoji_keyword
* federation allow/block list
* federation_queue_state
* instance_block
* local_site_rate_limit, local_user_language, login_token
* person_ban, person_block, person_follower, post_like, post_read, received_activity
* community_follower, community_language, site_language
* fmt
* image_upload
* remove unused newtypes
* remove more indexes
* use .find
* merge
* fix site_aggregates_site function
* fmt
* Primary keys dess (#17)
* Also order reports by oldest first (ref #4123) (#4129)
* Support signed fetch for federation (fixes #868) (#4125)
* Support signed fetch for federation (fixes #868)
* taplo
* add federation queue state to get_federated_instances api (#4104)
* add federation queue state to get_federated_instances api
* feature gate
* move retry sleep function
* move stuff around
* Add UI setting for collapsing bot comments. Fixes #3838 (#4098)
* Add UI setting for collapsing bot comments. Fixes #3838
* Fixing clippy check.
* Only keep sent and received activities for 7 days (fixes #4113, fixes #4110) (#4131)
* Only check auth secure on release mode. (#4127)
* Only check auth secure on release mode.
* Fixing wrong js-client.
* Adding is_debug_mode var.
* Fixing the desktop image on the README. (#4135)
* Delete dupes and add possibly missing unique constraint on person_aggregates.
* Fixing clippy lints.
---------
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
* fmt
* Update community_block.rs
* Update instance_block.rs
* Update person_block.rs
* Update person_block.rs
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
2023-11-13 13:14:07 +00:00
|
|
|
comment_like (person_id, comment_id) {
|
2021-02-26 13:49:58 +00:00
|
|
|
person_id -> Int4,
|
2020-05-06 02:06:24 +00:00
|
|
|
comment_id -> Int4,
|
|
|
|
post_id -> Int4,
|
|
|
|
score -> Int2,
|
2023-08-24 15:27:00 +00:00
|
|
|
published -> Timestamptz,
|
2020-05-06 02:06:24 +00:00
|
|
|
}
|
2019-04-20 04:06:25 +00:00
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::table! {
|
|
|
|
comment_reply (id) {
|
|
|
|
id -> Int4,
|
|
|
|
recipient_id -> Int4,
|
|
|
|
comment_id -> Int4,
|
|
|
|
read -> Bool,
|
2023-08-24 15:27:00 +00:00
|
|
|
published -> Timestamptz,
|
2023-04-17 19:19:51 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
diesel::table! {
|
2020-10-13 23:32:35 +00:00
|
|
|
comment_report (id) {
|
2020-10-21 00:31:01 +00:00
|
|
|
id -> Int4,
|
|
|
|
creator_id -> Int4,
|
2020-10-13 23:32:35 +00:00
|
|
|
comment_id -> Int4,
|
2020-11-04 02:15:11 +00:00
|
|
|
original_comment_text -> Text,
|
2020-10-21 00:31:01 +00:00
|
|
|
reason -> Text,
|
|
|
|
resolved -> Bool,
|
|
|
|
resolver_id -> Nullable<Int4>,
|
2023-08-24 15:27:00 +00:00
|
|
|
published -> Timestamptz,
|
|
|
|
updated -> Nullable<Timestamptz>,
|
2020-10-13 23:32:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::table! {
|
Remove id column and use different primary key on some tables (#4093)
* post_saved
* fmt
* remove unique and not null
* put person_id first in primary key and remove index
* use post_saved.find
* change captcha_answer
* remove removal of not null
* comment_aggregates
* comment_like
* comment_saved
* aggregates
* remove "\"
* deduplicate site_aggregates
* person_post_aggregates
* community_moderator
* community_block
* community_person_ban
* custom_emoji_keyword
* federation allow/block list
* federation_queue_state
* instance_block
* local_site_rate_limit, local_user_language, login_token
* person_ban, person_block, person_follower, post_like, post_read, received_activity
* community_follower, community_language, site_language
* fmt
* image_upload
* remove unused newtypes
* remove more indexes
* use .find
* merge
* fix site_aggregates_site function
* fmt
* Primary keys dess (#17)
* Also order reports by oldest first (ref #4123) (#4129)
* Support signed fetch for federation (fixes #868) (#4125)
* Support signed fetch for federation (fixes #868)
* taplo
* add federation queue state to get_federated_instances api (#4104)
* add federation queue state to get_federated_instances api
* feature gate
* move retry sleep function
* move stuff around
* Add UI setting for collapsing bot comments. Fixes #3838 (#4098)
* Add UI setting for collapsing bot comments. Fixes #3838
* Fixing clippy check.
* Only keep sent and received activities for 7 days (fixes #4113, fixes #4110) (#4131)
* Only check auth secure on release mode. (#4127)
* Only check auth secure on release mode.
* Fixing wrong js-client.
* Adding is_debug_mode var.
* Fixing the desktop image on the README. (#4135)
* Delete dupes and add possibly missing unique constraint on person_aggregates.
* Fixing clippy lints.
---------
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
* fmt
* Update community_block.rs
* Update instance_block.rs
* Update person_block.rs
* Update person_block.rs
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
2023-11-13 13:14:07 +00:00
|
|
|
comment_saved (person_id, comment_id) {
|
2020-05-06 02:06:24 +00:00
|
|
|
comment_id -> Int4,
|
2021-02-26 13:49:58 +00:00
|
|
|
person_id -> Int4,
|
2023-08-24 15:27:00 +00:00
|
|
|
published -> Timestamptz,
|
2020-05-06 02:06:24 +00:00
|
|
|
}
|
2019-03-04 16:39:07 +00:00
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::table! {
|
2020-05-06 02:06:24 +00:00
|
|
|
community (id) {
|
|
|
|
id -> Int4,
|
2023-06-07 10:54:40 +00:00
|
|
|
#[max_length = 255]
|
2020-05-06 02:06:24 +00:00
|
|
|
name -> Varchar,
|
2023-06-07 10:54:40 +00:00
|
|
|
#[max_length = 255]
|
2020-05-06 02:06:24 +00:00
|
|
|
title -> Varchar,
|
|
|
|
description -> Nullable<Text>,
|
|
|
|
removed -> Bool,
|
2023-08-24 15:27:00 +00:00
|
|
|
published -> Timestamptz,
|
|
|
|
updated -> Nullable<Timestamptz>,
|
2020-05-06 02:06:24 +00:00
|
|
|
deleted -> Bool,
|
|
|
|
nsfw -> Bool,
|
2023-06-07 10:54:40 +00:00
|
|
|
#[max_length = 255]
|
2020-05-06 02:06:24 +00:00
|
|
|
actor_id -> Varchar,
|
|
|
|
local -> Bool,
|
|
|
|
private_key -> Nullable<Text>,
|
2021-11-22 15:10:18 +00:00
|
|
|
public_key -> Text,
|
2023-08-24 15:27:00 +00:00
|
|
|
last_refreshed_at -> Timestamptz,
|
2023-04-17 19:19:51 +00:00
|
|
|
icon -> Nullable<Text>,
|
|
|
|
banner -> Nullable<Text>,
|
2023-06-07 10:54:40 +00:00
|
|
|
#[max_length = 255]
|
2021-02-26 13:49:58 +00:00
|
|
|
followers_url -> Varchar,
|
2023-06-07 10:54:40 +00:00
|
|
|
#[max_length = 255]
|
2021-02-26 13:49:58 +00:00
|
|
|
inbox_url -> Varchar,
|
2023-06-07 10:54:40 +00:00
|
|
|
#[max_length = 255]
|
2021-02-26 13:49:58 +00:00
|
|
|
shared_inbox_url -> Nullable<Varchar>,
|
2022-02-18 02:30:47 +00:00
|
|
|
hidden -> Bool,
|
2022-04-28 20:32:32 +00:00
|
|
|
posting_restricted_to_mods -> Bool,
|
2022-10-27 09:24:07 +00:00
|
|
|
instance_id -> Int4,
|
2023-06-07 10:54:40 +00:00
|
|
|
#[max_length = 255]
|
2023-04-17 19:19:51 +00:00
|
|
|
moderators_url -> Nullable<Varchar>,
|
2023-06-07 10:54:40 +00:00
|
|
|
#[max_length = 255]
|
2023-04-17 19:19:51 +00:00
|
|
|
featured_url -> Nullable<Varchar>,
|
2020-05-06 02:06:24 +00:00
|
|
|
}
|
2019-02-28 06:02:55 +00:00
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::table! {
|
Remove id column and use different primary key on some tables (#4093)
* post_saved
* fmt
* remove unique and not null
* put person_id first in primary key and remove index
* use post_saved.find
* change captcha_answer
* remove removal of not null
* comment_aggregates
* comment_like
* comment_saved
* aggregates
* remove "\"
* deduplicate site_aggregates
* person_post_aggregates
* community_moderator
* community_block
* community_person_ban
* custom_emoji_keyword
* federation allow/block list
* federation_queue_state
* instance_block
* local_site_rate_limit, local_user_language, login_token
* person_ban, person_block, person_follower, post_like, post_read, received_activity
* community_follower, community_language, site_language
* fmt
* image_upload
* remove unused newtypes
* remove more indexes
* use .find
* merge
* fix site_aggregates_site function
* fmt
* Primary keys dess (#17)
* Also order reports by oldest first (ref #4123) (#4129)
* Support signed fetch for federation (fixes #868) (#4125)
* Support signed fetch for federation (fixes #868)
* taplo
* add federation queue state to get_federated_instances api (#4104)
* add federation queue state to get_federated_instances api
* feature gate
* move retry sleep function
* move stuff around
* Add UI setting for collapsing bot comments. Fixes #3838 (#4098)
* Add UI setting for collapsing bot comments. Fixes #3838
* Fixing clippy check.
* Only keep sent and received activities for 7 days (fixes #4113, fixes #4110) (#4131)
* Only check auth secure on release mode. (#4127)
* Only check auth secure on release mode.
* Fixing wrong js-client.
* Adding is_debug_mode var.
* Fixing the desktop image on the README. (#4135)
* Delete dupes and add possibly missing unique constraint on person_aggregates.
* Fixing clippy lints.
---------
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
* fmt
* Update community_block.rs
* Update instance_block.rs
* Update person_block.rs
* Update person_block.rs
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
2023-11-13 13:14:07 +00:00
|
|
|
community_aggregates (community_id) {
|
2020-12-04 21:35:46 +00:00
|
|
|
community_id -> Int4,
|
|
|
|
subscribers -> Int8,
|
|
|
|
posts -> Int8,
|
|
|
|
comments -> Int8,
|
2023-08-24 15:27:00 +00:00
|
|
|
published -> Timestamptz,
|
2021-01-29 16:38:27 +00:00
|
|
|
users_active_day -> Int8,
|
|
|
|
users_active_week -> Int8,
|
|
|
|
users_active_month -> Int8,
|
|
|
|
users_active_half_year -> Int8,
|
2023-09-06 17:43:27 +00:00
|
|
|
hot_rank -> Float8,
|
2020-12-04 21:35:46 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::table! {
|
Remove id column and use different primary key on some tables (#4093)
* post_saved
* fmt
* remove unique and not null
* put person_id first in primary key and remove index
* use post_saved.find
* change captcha_answer
* remove removal of not null
* comment_aggregates
* comment_like
* comment_saved
* aggregates
* remove "\"
* deduplicate site_aggregates
* person_post_aggregates
* community_moderator
* community_block
* community_person_ban
* custom_emoji_keyword
* federation allow/block list
* federation_queue_state
* instance_block
* local_site_rate_limit, local_user_language, login_token
* person_ban, person_block, person_follower, post_like, post_read, received_activity
* community_follower, community_language, site_language
* fmt
* image_upload
* remove unused newtypes
* remove more indexes
* use .find
* merge
* fix site_aggregates_site function
* fmt
* Primary keys dess (#17)
* Also order reports by oldest first (ref #4123) (#4129)
* Support signed fetch for federation (fixes #868) (#4125)
* Support signed fetch for federation (fixes #868)
* taplo
* add federation queue state to get_federated_instances api (#4104)
* add federation queue state to get_federated_instances api
* feature gate
* move retry sleep function
* move stuff around
* Add UI setting for collapsing bot comments. Fixes #3838 (#4098)
* Add UI setting for collapsing bot comments. Fixes #3838
* Fixing clippy check.
* Only keep sent and received activities for 7 days (fixes #4113, fixes #4110) (#4131)
* Only check auth secure on release mode. (#4127)
* Only check auth secure on release mode.
* Fixing wrong js-client.
* Adding is_debug_mode var.
* Fixing the desktop image on the README. (#4135)
* Delete dupes and add possibly missing unique constraint on person_aggregates.
* Fixing clippy lints.
---------
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
* fmt
* Update community_block.rs
* Update instance_block.rs
* Update person_block.rs
* Update person_block.rs
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
2023-11-13 13:14:07 +00:00
|
|
|
community_block (person_id, community_id) {
|
2023-04-17 19:19:51 +00:00
|
|
|
person_id -> Int4,
|
|
|
|
community_id -> Int4,
|
2023-08-24 15:27:00 +00:00
|
|
|
published -> Timestamptz,
|
2023-04-17 19:19:51 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
diesel::table! {
|
Remove id column and use different primary key on some tables (#4093)
* post_saved
* fmt
* remove unique and not null
* put person_id first in primary key and remove index
* use post_saved.find
* change captcha_answer
* remove removal of not null
* comment_aggregates
* comment_like
* comment_saved
* aggregates
* remove "\"
* deduplicate site_aggregates
* person_post_aggregates
* community_moderator
* community_block
* community_person_ban
* custom_emoji_keyword
* federation allow/block list
* federation_queue_state
* instance_block
* local_site_rate_limit, local_user_language, login_token
* person_ban, person_block, person_follower, post_like, post_read, received_activity
* community_follower, community_language, site_language
* fmt
* image_upload
* remove unused newtypes
* remove more indexes
* use .find
* merge
* fix site_aggregates_site function
* fmt
* Primary keys dess (#17)
* Also order reports by oldest first (ref #4123) (#4129)
* Support signed fetch for federation (fixes #868) (#4125)
* Support signed fetch for federation (fixes #868)
* taplo
* add federation queue state to get_federated_instances api (#4104)
* add federation queue state to get_federated_instances api
* feature gate
* move retry sleep function
* move stuff around
* Add UI setting for collapsing bot comments. Fixes #3838 (#4098)
* Add UI setting for collapsing bot comments. Fixes #3838
* Fixing clippy check.
* Only keep sent and received activities for 7 days (fixes #4113, fixes #4110) (#4131)
* Only check auth secure on release mode. (#4127)
* Only check auth secure on release mode.
* Fixing wrong js-client.
* Adding is_debug_mode var.
* Fixing the desktop image on the README. (#4135)
* Delete dupes and add possibly missing unique constraint on person_aggregates.
* Fixing clippy lints.
---------
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
* fmt
* Update community_block.rs
* Update instance_block.rs
* Update person_block.rs
* Update person_block.rs
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
2023-11-13 13:14:07 +00:00
|
|
|
community_follower (person_id, community_id) {
|
2020-05-06 02:06:24 +00:00
|
|
|
community_id -> Int4,
|
2021-02-26 13:49:58 +00:00
|
|
|
person_id -> Int4,
|
2023-08-24 15:27:00 +00:00
|
|
|
published -> Timestamptz,
|
2022-11-23 23:40:47 +00:00
|
|
|
pending -> Bool,
|
2020-05-06 02:06:24 +00:00
|
|
|
}
|
2019-03-04 16:39:07 +00:00
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::table! {
|
Remove id column and use different primary key on some tables (#4093)
* post_saved
* fmt
* remove unique and not null
* put person_id first in primary key and remove index
* use post_saved.find
* change captcha_answer
* remove removal of not null
* comment_aggregates
* comment_like
* comment_saved
* aggregates
* remove "\"
* deduplicate site_aggregates
* person_post_aggregates
* community_moderator
* community_block
* community_person_ban
* custom_emoji_keyword
* federation allow/block list
* federation_queue_state
* instance_block
* local_site_rate_limit, local_user_language, login_token
* person_ban, person_block, person_follower, post_like, post_read, received_activity
* community_follower, community_language, site_language
* fmt
* image_upload
* remove unused newtypes
* remove more indexes
* use .find
* merge
* fix site_aggregates_site function
* fmt
* Primary keys dess (#17)
* Also order reports by oldest first (ref #4123) (#4129)
* Support signed fetch for federation (fixes #868) (#4125)
* Support signed fetch for federation (fixes #868)
* taplo
* add federation queue state to get_federated_instances api (#4104)
* add federation queue state to get_federated_instances api
* feature gate
* move retry sleep function
* move stuff around
* Add UI setting for collapsing bot comments. Fixes #3838 (#4098)
* Add UI setting for collapsing bot comments. Fixes #3838
* Fixing clippy check.
* Only keep sent and received activities for 7 days (fixes #4113, fixes #4110) (#4131)
* Only check auth secure on release mode. (#4127)
* Only check auth secure on release mode.
* Fixing wrong js-client.
* Adding is_debug_mode var.
* Fixing the desktop image on the README. (#4135)
* Delete dupes and add possibly missing unique constraint on person_aggregates.
* Fixing clippy lints.
---------
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
* fmt
* Update community_block.rs
* Update instance_block.rs
* Update person_block.rs
* Update person_block.rs
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
2023-11-13 13:14:07 +00:00
|
|
|
community_language (community_id, language_id) {
|
2023-04-17 19:19:51 +00:00
|
|
|
community_id -> Int4,
|
|
|
|
language_id -> Int4,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
diesel::table! {
|
Remove id column and use different primary key on some tables (#4093)
* post_saved
* fmt
* remove unique and not null
* put person_id first in primary key and remove index
* use post_saved.find
* change captcha_answer
* remove removal of not null
* comment_aggregates
* comment_like
* comment_saved
* aggregates
* remove "\"
* deduplicate site_aggregates
* person_post_aggregates
* community_moderator
* community_block
* community_person_ban
* custom_emoji_keyword
* federation allow/block list
* federation_queue_state
* instance_block
* local_site_rate_limit, local_user_language, login_token
* person_ban, person_block, person_follower, post_like, post_read, received_activity
* community_follower, community_language, site_language
* fmt
* image_upload
* remove unused newtypes
* remove more indexes
* use .find
* merge
* fix site_aggregates_site function
* fmt
* Primary keys dess (#17)
* Also order reports by oldest first (ref #4123) (#4129)
* Support signed fetch for federation (fixes #868) (#4125)
* Support signed fetch for federation (fixes #868)
* taplo
* add federation queue state to get_federated_instances api (#4104)
* add federation queue state to get_federated_instances api
* feature gate
* move retry sleep function
* move stuff around
* Add UI setting for collapsing bot comments. Fixes #3838 (#4098)
* Add UI setting for collapsing bot comments. Fixes #3838
* Fixing clippy check.
* Only keep sent and received activities for 7 days (fixes #4113, fixes #4110) (#4131)
* Only check auth secure on release mode. (#4127)
* Only check auth secure on release mode.
* Fixing wrong js-client.
* Adding is_debug_mode var.
* Fixing the desktop image on the README. (#4135)
* Delete dupes and add possibly missing unique constraint on person_aggregates.
* Fixing clippy lints.
---------
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
* fmt
* Update community_block.rs
* Update instance_block.rs
* Update person_block.rs
* Update person_block.rs
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
2023-11-13 13:14:07 +00:00
|
|
|
community_moderator (person_id, community_id) {
|
2020-05-06 02:06:24 +00:00
|
|
|
community_id -> Int4,
|
2021-02-26 13:49:58 +00:00
|
|
|
person_id -> Int4,
|
2023-08-24 15:27:00 +00:00
|
|
|
published -> Timestamptz,
|
2020-05-06 02:06:24 +00:00
|
|
|
}
|
2019-04-15 23:12:06 +00:00
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::table! {
|
Remove id column and use different primary key on some tables (#4093)
* post_saved
* fmt
* remove unique and not null
* put person_id first in primary key and remove index
* use post_saved.find
* change captcha_answer
* remove removal of not null
* comment_aggregates
* comment_like
* comment_saved
* aggregates
* remove "\"
* deduplicate site_aggregates
* person_post_aggregates
* community_moderator
* community_block
* community_person_ban
* custom_emoji_keyword
* federation allow/block list
* federation_queue_state
* instance_block
* local_site_rate_limit, local_user_language, login_token
* person_ban, person_block, person_follower, post_like, post_read, received_activity
* community_follower, community_language, site_language
* fmt
* image_upload
* remove unused newtypes
* remove more indexes
* use .find
* merge
* fix site_aggregates_site function
* fmt
* Primary keys dess (#17)
* Also order reports by oldest first (ref #4123) (#4129)
* Support signed fetch for federation (fixes #868) (#4125)
* Support signed fetch for federation (fixes #868)
* taplo
* add federation queue state to get_federated_instances api (#4104)
* add federation queue state to get_federated_instances api
* feature gate
* move retry sleep function
* move stuff around
* Add UI setting for collapsing bot comments. Fixes #3838 (#4098)
* Add UI setting for collapsing bot comments. Fixes #3838
* Fixing clippy check.
* Only keep sent and received activities for 7 days (fixes #4113, fixes #4110) (#4131)
* Only check auth secure on release mode. (#4127)
* Only check auth secure on release mode.
* Fixing wrong js-client.
* Adding is_debug_mode var.
* Fixing the desktop image on the README. (#4135)
* Delete dupes and add possibly missing unique constraint on person_aggregates.
* Fixing clippy lints.
---------
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
* fmt
* Update community_block.rs
* Update instance_block.rs
* Update person_block.rs
* Update person_block.rs
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
2023-11-13 13:14:07 +00:00
|
|
|
community_person_ban (person_id, community_id) {
|
2020-05-06 02:06:24 +00:00
|
|
|
community_id -> Int4,
|
2021-02-26 13:49:58 +00:00
|
|
|
person_id -> Int4,
|
2023-08-24 15:27:00 +00:00
|
|
|
published -> Timestamptz,
|
|
|
|
expires -> Nullable<Timestamptz>,
|
2020-05-06 02:06:24 +00:00
|
|
|
}
|
2019-04-15 23:12:06 +00:00
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::table! {
|
|
|
|
custom_emoji (id) {
|
|
|
|
id -> Int4,
|
|
|
|
local_site_id -> Int4,
|
2023-06-07 10:54:40 +00:00
|
|
|
#[max_length = 128]
|
2023-04-17 19:19:51 +00:00
|
|
|
shortcode -> Varchar,
|
|
|
|
image_url -> Text,
|
|
|
|
alt_text -> Text,
|
|
|
|
category -> Text,
|
2023-08-24 15:27:00 +00:00
|
|
|
published -> Timestamptz,
|
|
|
|
updated -> Nullable<Timestamptz>,
|
2023-04-17 19:19:51 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
diesel::table! {
|
Remove id column and use different primary key on some tables (#4093)
* post_saved
* fmt
* remove unique and not null
* put person_id first in primary key and remove index
* use post_saved.find
* change captcha_answer
* remove removal of not null
* comment_aggregates
* comment_like
* comment_saved
* aggregates
* remove "\"
* deduplicate site_aggregates
* person_post_aggregates
* community_moderator
* community_block
* community_person_ban
* custom_emoji_keyword
* federation allow/block list
* federation_queue_state
* instance_block
* local_site_rate_limit, local_user_language, login_token
* person_ban, person_block, person_follower, post_like, post_read, received_activity
* community_follower, community_language, site_language
* fmt
* image_upload
* remove unused newtypes
* remove more indexes
* use .find
* merge
* fix site_aggregates_site function
* fmt
* Primary keys dess (#17)
* Also order reports by oldest first (ref #4123) (#4129)
* Support signed fetch for federation (fixes #868) (#4125)
* Support signed fetch for federation (fixes #868)
* taplo
* add federation queue state to get_federated_instances api (#4104)
* add federation queue state to get_federated_instances api
* feature gate
* move retry sleep function
* move stuff around
* Add UI setting for collapsing bot comments. Fixes #3838 (#4098)
* Add UI setting for collapsing bot comments. Fixes #3838
* Fixing clippy check.
* Only keep sent and received activities for 7 days (fixes #4113, fixes #4110) (#4131)
* Only check auth secure on release mode. (#4127)
* Only check auth secure on release mode.
* Fixing wrong js-client.
* Adding is_debug_mode var.
* Fixing the desktop image on the README. (#4135)
* Delete dupes and add possibly missing unique constraint on person_aggregates.
* Fixing clippy lints.
---------
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
* fmt
* Update community_block.rs
* Update instance_block.rs
* Update person_block.rs
* Update person_block.rs
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
2023-11-13 13:14:07 +00:00
|
|
|
custom_emoji_keyword (custom_emoji_id, keyword) {
|
2023-04-17 19:19:51 +00:00
|
|
|
custom_emoji_id -> Int4,
|
2023-06-07 10:54:40 +00:00
|
|
|
#[max_length = 128]
|
2023-04-17 19:19:51 +00:00
|
|
|
keyword -> Varchar,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
diesel::table! {
|
|
|
|
email_verification (id) {
|
|
|
|
id -> Int4,
|
|
|
|
local_user_id -> Int4,
|
|
|
|
email -> Text,
|
|
|
|
verification_token -> Text,
|
2023-08-24 15:27:00 +00:00
|
|
|
published -> Timestamptz,
|
2023-04-17 19:19:51 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
diesel::table! {
|
Remove id column and use different primary key on some tables (#4093)
* post_saved
* fmt
* remove unique and not null
* put person_id first in primary key and remove index
* use post_saved.find
* change captcha_answer
* remove removal of not null
* comment_aggregates
* comment_like
* comment_saved
* aggregates
* remove "\"
* deduplicate site_aggregates
* person_post_aggregates
* community_moderator
* community_block
* community_person_ban
* custom_emoji_keyword
* federation allow/block list
* federation_queue_state
* instance_block
* local_site_rate_limit, local_user_language, login_token
* person_ban, person_block, person_follower, post_like, post_read, received_activity
* community_follower, community_language, site_language
* fmt
* image_upload
* remove unused newtypes
* remove more indexes
* use .find
* merge
* fix site_aggregates_site function
* fmt
* Primary keys dess (#17)
* Also order reports by oldest first (ref #4123) (#4129)
* Support signed fetch for federation (fixes #868) (#4125)
* Support signed fetch for federation (fixes #868)
* taplo
* add federation queue state to get_federated_instances api (#4104)
* add federation queue state to get_federated_instances api
* feature gate
* move retry sleep function
* move stuff around
* Add UI setting for collapsing bot comments. Fixes #3838 (#4098)
* Add UI setting for collapsing bot comments. Fixes #3838
* Fixing clippy check.
* Only keep sent and received activities for 7 days (fixes #4113, fixes #4110) (#4131)
* Only check auth secure on release mode. (#4127)
* Only check auth secure on release mode.
* Fixing wrong js-client.
* Adding is_debug_mode var.
* Fixing the desktop image on the README. (#4135)
* Delete dupes and add possibly missing unique constraint on person_aggregates.
* Fixing clippy lints.
---------
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
* fmt
* Update community_block.rs
* Update instance_block.rs
* Update person_block.rs
* Update person_block.rs
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
2023-11-13 13:14:07 +00:00
|
|
|
federation_allowlist (instance_id) {
|
2023-04-17 19:19:51 +00:00
|
|
|
instance_id -> Int4,
|
2023-08-24 15:27:00 +00:00
|
|
|
published -> Timestamptz,
|
|
|
|
updated -> Nullable<Timestamptz>,
|
2023-04-17 19:19:51 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
diesel::table! {
|
Remove id column and use different primary key on some tables (#4093)
* post_saved
* fmt
* remove unique and not null
* put person_id first in primary key and remove index
* use post_saved.find
* change captcha_answer
* remove removal of not null
* comment_aggregates
* comment_like
* comment_saved
* aggregates
* remove "\"
* deduplicate site_aggregates
* person_post_aggregates
* community_moderator
* community_block
* community_person_ban
* custom_emoji_keyword
* federation allow/block list
* federation_queue_state
* instance_block
* local_site_rate_limit, local_user_language, login_token
* person_ban, person_block, person_follower, post_like, post_read, received_activity
* community_follower, community_language, site_language
* fmt
* image_upload
* remove unused newtypes
* remove more indexes
* use .find
* merge
* fix site_aggregates_site function
* fmt
* Primary keys dess (#17)
* Also order reports by oldest first (ref #4123) (#4129)
* Support signed fetch for federation (fixes #868) (#4125)
* Support signed fetch for federation (fixes #868)
* taplo
* add federation queue state to get_federated_instances api (#4104)
* add federation queue state to get_federated_instances api
* feature gate
* move retry sleep function
* move stuff around
* Add UI setting for collapsing bot comments. Fixes #3838 (#4098)
* Add UI setting for collapsing bot comments. Fixes #3838
* Fixing clippy check.
* Only keep sent and received activities for 7 days (fixes #4113, fixes #4110) (#4131)
* Only check auth secure on release mode. (#4127)
* Only check auth secure on release mode.
* Fixing wrong js-client.
* Adding is_debug_mode var.
* Fixing the desktop image on the README. (#4135)
* Delete dupes and add possibly missing unique constraint on person_aggregates.
* Fixing clippy lints.
---------
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
* fmt
* Update community_block.rs
* Update instance_block.rs
* Update person_block.rs
* Update person_block.rs
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
2023-11-13 13:14:07 +00:00
|
|
|
federation_blocklist (instance_id) {
|
2023-04-17 19:19:51 +00:00
|
|
|
instance_id -> Int4,
|
2023-08-24 15:27:00 +00:00
|
|
|
published -> Timestamptz,
|
|
|
|
updated -> Nullable<Timestamptz>,
|
2023-04-17 19:19:51 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-09-09 16:25:03 +00:00
|
|
|
diesel::table! {
|
Remove id column and use different primary key on some tables (#4093)
* post_saved
* fmt
* remove unique and not null
* put person_id first in primary key and remove index
* use post_saved.find
* change captcha_answer
* remove removal of not null
* comment_aggregates
* comment_like
* comment_saved
* aggregates
* remove "\"
* deduplicate site_aggregates
* person_post_aggregates
* community_moderator
* community_block
* community_person_ban
* custom_emoji_keyword
* federation allow/block list
* federation_queue_state
* instance_block
* local_site_rate_limit, local_user_language, login_token
* person_ban, person_block, person_follower, post_like, post_read, received_activity
* community_follower, community_language, site_language
* fmt
* image_upload
* remove unused newtypes
* remove more indexes
* use .find
* merge
* fix site_aggregates_site function
* fmt
* Primary keys dess (#17)
* Also order reports by oldest first (ref #4123) (#4129)
* Support signed fetch for federation (fixes #868) (#4125)
* Support signed fetch for federation (fixes #868)
* taplo
* add federation queue state to get_federated_instances api (#4104)
* add federation queue state to get_federated_instances api
* feature gate
* move retry sleep function
* move stuff around
* Add UI setting for collapsing bot comments. Fixes #3838 (#4098)
* Add UI setting for collapsing bot comments. Fixes #3838
* Fixing clippy check.
* Only keep sent and received activities for 7 days (fixes #4113, fixes #4110) (#4131)
* Only check auth secure on release mode. (#4127)
* Only check auth secure on release mode.
* Fixing wrong js-client.
* Adding is_debug_mode var.
* Fixing the desktop image on the README. (#4135)
* Delete dupes and add possibly missing unique constraint on person_aggregates.
* Fixing clippy lints.
---------
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
* fmt
* Update community_block.rs
* Update instance_block.rs
* Update person_block.rs
* Update person_block.rs
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
2023-11-13 13:14:07 +00:00
|
|
|
federation_queue_state (instance_id) {
|
2023-09-09 16:25:03 +00:00
|
|
|
instance_id -> Int4,
|
2023-11-06 21:07:04 +00:00
|
|
|
last_successful_id -> Nullable<Int8>,
|
2023-09-09 16:25:03 +00:00
|
|
|
fail_count -> Int4,
|
2023-11-06 21:07:04 +00:00
|
|
|
last_retry -> Nullable<Timestamptz>,
|
|
|
|
last_successful_published_time -> Nullable<Timestamptz>,
|
2023-09-09 16:25:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-09-06 17:43:27 +00:00
|
|
|
diesel::table! {
|
Remove id column and use different primary key on some tables (#4093)
* post_saved
* fmt
* remove unique and not null
* put person_id first in primary key and remove index
* use post_saved.find
* change captcha_answer
* remove removal of not null
* comment_aggregates
* comment_like
* comment_saved
* aggregates
* remove "\"
* deduplicate site_aggregates
* person_post_aggregates
* community_moderator
* community_block
* community_person_ban
* custom_emoji_keyword
* federation allow/block list
* federation_queue_state
* instance_block
* local_site_rate_limit, local_user_language, login_token
* person_ban, person_block, person_follower, post_like, post_read, received_activity
* community_follower, community_language, site_language
* fmt
* image_upload
* remove unused newtypes
* remove more indexes
* use .find
* merge
* fix site_aggregates_site function
* fmt
* Primary keys dess (#17)
* Also order reports by oldest first (ref #4123) (#4129)
* Support signed fetch for federation (fixes #868) (#4125)
* Support signed fetch for federation (fixes #868)
* taplo
* add federation queue state to get_federated_instances api (#4104)
* add federation queue state to get_federated_instances api
* feature gate
* move retry sleep function
* move stuff around
* Add UI setting for collapsing bot comments. Fixes #3838 (#4098)
* Add UI setting for collapsing bot comments. Fixes #3838
* Fixing clippy check.
* Only keep sent and received activities for 7 days (fixes #4113, fixes #4110) (#4131)
* Only check auth secure on release mode. (#4127)
* Only check auth secure on release mode.
* Fixing wrong js-client.
* Adding is_debug_mode var.
* Fixing the desktop image on the README. (#4135)
* Delete dupes and add possibly missing unique constraint on person_aggregates.
* Fixing clippy lints.
---------
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
* fmt
* Update community_block.rs
* Update instance_block.rs
* Update person_block.rs
* Update person_block.rs
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
2023-11-13 13:14:07 +00:00
|
|
|
image_upload (pictrs_alias) {
|
2023-09-06 17:43:27 +00:00
|
|
|
local_user_id -> Int4,
|
|
|
|
pictrs_alias -> Text,
|
|
|
|
pictrs_delete_token -> Text,
|
|
|
|
published -> Timestamptz,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::table! {
|
|
|
|
instance (id) {
|
|
|
|
id -> Int4,
|
2023-06-07 10:54:40 +00:00
|
|
|
#[max_length = 255]
|
2023-04-17 19:19:51 +00:00
|
|
|
domain -> Varchar,
|
2023-08-24 15:27:00 +00:00
|
|
|
published -> Timestamptz,
|
|
|
|
updated -> Nullable<Timestamptz>,
|
2023-06-07 10:54:40 +00:00
|
|
|
#[max_length = 255]
|
2023-04-17 19:19:51 +00:00
|
|
|
software -> Nullable<Varchar>,
|
2023-06-07 10:54:40 +00:00
|
|
|
#[max_length = 255]
|
2023-04-17 19:19:51 +00:00
|
|
|
version -> Nullable<Varchar>,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-09-20 09:56:13 +00:00
|
|
|
diesel::table! {
|
Remove id column and use different primary key on some tables (#4093)
* post_saved
* fmt
* remove unique and not null
* put person_id first in primary key and remove index
* use post_saved.find
* change captcha_answer
* remove removal of not null
* comment_aggregates
* comment_like
* comment_saved
* aggregates
* remove "\"
* deduplicate site_aggregates
* person_post_aggregates
* community_moderator
* community_block
* community_person_ban
* custom_emoji_keyword
* federation allow/block list
* federation_queue_state
* instance_block
* local_site_rate_limit, local_user_language, login_token
* person_ban, person_block, person_follower, post_like, post_read, received_activity
* community_follower, community_language, site_language
* fmt
* image_upload
* remove unused newtypes
* remove more indexes
* use .find
* merge
* fix site_aggregates_site function
* fmt
* Primary keys dess (#17)
* Also order reports by oldest first (ref #4123) (#4129)
* Support signed fetch for federation (fixes #868) (#4125)
* Support signed fetch for federation (fixes #868)
* taplo
* add federation queue state to get_federated_instances api (#4104)
* add federation queue state to get_federated_instances api
* feature gate
* move retry sleep function
* move stuff around
* Add UI setting for collapsing bot comments. Fixes #3838 (#4098)
* Add UI setting for collapsing bot comments. Fixes #3838
* Fixing clippy check.
* Only keep sent and received activities for 7 days (fixes #4113, fixes #4110) (#4131)
* Only check auth secure on release mode. (#4127)
* Only check auth secure on release mode.
* Fixing wrong js-client.
* Adding is_debug_mode var.
* Fixing the desktop image on the README. (#4135)
* Delete dupes and add possibly missing unique constraint on person_aggregates.
* Fixing clippy lints.
---------
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
* fmt
* Update community_block.rs
* Update instance_block.rs
* Update person_block.rs
* Update person_block.rs
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
2023-11-13 13:14:07 +00:00
|
|
|
instance_block (person_id, instance_id) {
|
2023-09-20 09:56:13 +00:00
|
|
|
person_id -> Int4,
|
|
|
|
instance_id -> Int4,
|
|
|
|
published -> Timestamptz,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::table! {
|
|
|
|
language (id) {
|
|
|
|
id -> Int4,
|
2023-06-07 10:54:40 +00:00
|
|
|
#[max_length = 3]
|
2023-04-17 19:19:51 +00:00
|
|
|
code -> Varchar,
|
|
|
|
name -> Text,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
diesel::table! {
|
2023-06-26 09:18:29 +00:00
|
|
|
use diesel::sql_types::*;
|
2023-04-17 19:19:51 +00:00
|
|
|
use super::sql_types::ListingTypeEnum;
|
|
|
|
use super::sql_types::RegistrationModeEnum;
|
|
|
|
|
|
|
|
local_site (id) {
|
|
|
|
id -> Int4,
|
|
|
|
site_id -> Int4,
|
|
|
|
site_setup -> Bool,
|
|
|
|
enable_downvotes -> Bool,
|
|
|
|
enable_nsfw -> Bool,
|
|
|
|
community_creation_admin_only -> Bool,
|
|
|
|
require_email_verification -> Bool,
|
|
|
|
application_question -> Nullable<Text>,
|
|
|
|
private_instance -> Bool,
|
|
|
|
default_theme -> Text,
|
|
|
|
default_post_listing_type -> ListingTypeEnum,
|
|
|
|
legal_information -> Nullable<Text>,
|
|
|
|
hide_modlog_mod_names -> Bool,
|
|
|
|
application_email_admins -> Bool,
|
|
|
|
slur_filter_regex -> Nullable<Text>,
|
|
|
|
actor_name_max_length -> Int4,
|
|
|
|
federation_enabled -> Bool,
|
|
|
|
captcha_enabled -> Bool,
|
2023-06-07 10:54:40 +00:00
|
|
|
#[max_length = 255]
|
2023-04-17 19:19:51 +00:00
|
|
|
captcha_difficulty -> Varchar,
|
2023-08-24 15:27:00 +00:00
|
|
|
published -> Timestamptz,
|
|
|
|
updated -> Nullable<Timestamptz>,
|
2023-04-17 19:19:51 +00:00
|
|
|
registration_mode -> RegistrationModeEnum,
|
|
|
|
reports_email_admins -> Bool,
|
2023-11-06 21:02:01 +00:00
|
|
|
federation_signed_fetch -> Bool,
|
2023-04-17 19:19:51 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
diesel::table! {
|
Remove id column and use different primary key on some tables (#4093)
* post_saved
* fmt
* remove unique and not null
* put person_id first in primary key and remove index
* use post_saved.find
* change captcha_answer
* remove removal of not null
* comment_aggregates
* comment_like
* comment_saved
* aggregates
* remove "\"
* deduplicate site_aggregates
* person_post_aggregates
* community_moderator
* community_block
* community_person_ban
* custom_emoji_keyword
* federation allow/block list
* federation_queue_state
* instance_block
* local_site_rate_limit, local_user_language, login_token
* person_ban, person_block, person_follower, post_like, post_read, received_activity
* community_follower, community_language, site_language
* fmt
* image_upload
* remove unused newtypes
* remove more indexes
* use .find
* merge
* fix site_aggregates_site function
* fmt
* Primary keys dess (#17)
* Also order reports by oldest first (ref #4123) (#4129)
* Support signed fetch for federation (fixes #868) (#4125)
* Support signed fetch for federation (fixes #868)
* taplo
* add federation queue state to get_federated_instances api (#4104)
* add federation queue state to get_federated_instances api
* feature gate
* move retry sleep function
* move stuff around
* Add UI setting for collapsing bot comments. Fixes #3838 (#4098)
* Add UI setting for collapsing bot comments. Fixes #3838
* Fixing clippy check.
* Only keep sent and received activities for 7 days (fixes #4113, fixes #4110) (#4131)
* Only check auth secure on release mode. (#4127)
* Only check auth secure on release mode.
* Fixing wrong js-client.
* Adding is_debug_mode var.
* Fixing the desktop image on the README. (#4135)
* Delete dupes and add possibly missing unique constraint on person_aggregates.
* Fixing clippy lints.
---------
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
* fmt
* Update community_block.rs
* Update instance_block.rs
* Update person_block.rs
* Update person_block.rs
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
2023-11-13 13:14:07 +00:00
|
|
|
local_site_rate_limit (local_site_id) {
|
2023-04-17 19:19:51 +00:00
|
|
|
local_site_id -> Int4,
|
|
|
|
message -> Int4,
|
|
|
|
message_per_second -> Int4,
|
|
|
|
post -> Int4,
|
|
|
|
post_per_second -> Int4,
|
|
|
|
register -> Int4,
|
|
|
|
register_per_second -> Int4,
|
|
|
|
image -> Int4,
|
|
|
|
image_per_second -> Int4,
|
|
|
|
comment -> Int4,
|
|
|
|
comment_per_second -> Int4,
|
|
|
|
search -> Int4,
|
|
|
|
search_per_second -> Int4,
|
2023-08-24 15:27:00 +00:00
|
|
|
published -> Timestamptz,
|
|
|
|
updated -> Nullable<Timestamptz>,
|
2023-10-11 14:47:22 +00:00
|
|
|
import_user_settings -> Int4,
|
|
|
|
import_user_settings_per_second -> Int4,
|
2023-04-17 19:19:51 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
diesel::table! {
|
2023-06-26 09:18:29 +00:00
|
|
|
use diesel::sql_types::*;
|
2023-04-17 19:19:51 +00:00
|
|
|
use super::sql_types::SortTypeEnum;
|
|
|
|
use super::sql_types::ListingTypeEnum;
|
2023-08-31 13:01:08 +00:00
|
|
|
use super::sql_types::PostListingModeEnum;
|
2023-04-17 19:19:51 +00:00
|
|
|
|
2021-02-26 13:49:58 +00:00
|
|
|
local_user (id) {
|
|
|
|
id -> Int4,
|
|
|
|
person_id -> Int4,
|
|
|
|
password_encrypted -> Text,
|
|
|
|
email -> Nullable<Text>,
|
|
|
|
show_nsfw -> Bool,
|
2023-06-26 08:53:04 +00:00
|
|
|
theme -> Text,
|
2023-04-17 19:19:51 +00:00
|
|
|
default_sort_type -> SortTypeEnum,
|
|
|
|
default_listing_type -> ListingTypeEnum,
|
2023-06-07 10:54:40 +00:00
|
|
|
#[max_length = 20]
|
2022-08-18 19:11:19 +00:00
|
|
|
interface_language -> Varchar,
|
2021-02-26 13:49:58 +00:00
|
|
|
show_avatars -> Bool,
|
|
|
|
send_notifications_to_email -> Bool,
|
2021-03-31 10:54:46 +00:00
|
|
|
show_scores -> Bool,
|
2023-04-17 19:19:51 +00:00
|
|
|
show_bot_accounts -> Bool,
|
2021-04-24 22:26:50 +00:00
|
|
|
show_read_posts -> Bool,
|
2021-12-15 19:49:59 +00:00
|
|
|
email_verified -> Bool,
|
|
|
|
accepted_application -> Bool,
|
2023-03-02 20:37:41 +00:00
|
|
|
totp_2fa_secret -> Nullable<Text>,
|
2023-07-03 15:10:25 +00:00
|
|
|
open_links_in_new_tab -> Bool,
|
2023-07-26 11:53:45 +00:00
|
|
|
blur_nsfw -> Bool,
|
|
|
|
auto_expand -> Bool,
|
2023-09-06 14:56:26 +00:00
|
|
|
infinite_scroll_enabled -> Bool,
|
2023-08-24 09:40:08 +00:00
|
|
|
admin -> Bool,
|
2023-08-31 13:01:08 +00:00
|
|
|
post_listing_mode -> PostListingModeEnum,
|
2023-09-20 14:49:54 +00:00
|
|
|
totp_2fa_enabled -> Bool,
|
2023-10-10 10:17:27 +00:00
|
|
|
enable_keyboard_navigation -> Bool,
|
2023-10-17 14:52:34 +00:00
|
|
|
enable_animated_images -> Bool,
|
2023-11-06 21:09:12 +00:00
|
|
|
collapse_bot_comments -> Bool,
|
2021-02-26 13:49:58 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::table! {
|
Remove id column and use different primary key on some tables (#4093)
* post_saved
* fmt
* remove unique and not null
* put person_id first in primary key and remove index
* use post_saved.find
* change captcha_answer
* remove removal of not null
* comment_aggregates
* comment_like
* comment_saved
* aggregates
* remove "\"
* deduplicate site_aggregates
* person_post_aggregates
* community_moderator
* community_block
* community_person_ban
* custom_emoji_keyword
* federation allow/block list
* federation_queue_state
* instance_block
* local_site_rate_limit, local_user_language, login_token
* person_ban, person_block, person_follower, post_like, post_read, received_activity
* community_follower, community_language, site_language
* fmt
* image_upload
* remove unused newtypes
* remove more indexes
* use .find
* merge
* fix site_aggregates_site function
* fmt
* Primary keys dess (#17)
* Also order reports by oldest first (ref #4123) (#4129)
* Support signed fetch for federation (fixes #868) (#4125)
* Support signed fetch for federation (fixes #868)
* taplo
* add federation queue state to get_federated_instances api (#4104)
* add federation queue state to get_federated_instances api
* feature gate
* move retry sleep function
* move stuff around
* Add UI setting for collapsing bot comments. Fixes #3838 (#4098)
* Add UI setting for collapsing bot comments. Fixes #3838
* Fixing clippy check.
* Only keep sent and received activities for 7 days (fixes #4113, fixes #4110) (#4131)
* Only check auth secure on release mode. (#4127)
* Only check auth secure on release mode.
* Fixing wrong js-client.
* Adding is_debug_mode var.
* Fixing the desktop image on the README. (#4135)
* Delete dupes and add possibly missing unique constraint on person_aggregates.
* Fixing clippy lints.
---------
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
* fmt
* Update community_block.rs
* Update instance_block.rs
* Update person_block.rs
* Update person_block.rs
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
2023-11-13 13:14:07 +00:00
|
|
|
local_user_language (local_user_id, language_id) {
|
2023-04-17 19:19:51 +00:00
|
|
|
local_user_id -> Int4,
|
|
|
|
language_id -> Int4,
|
2020-05-06 02:06:24 +00:00
|
|
|
}
|
2019-04-15 23:12:06 +00:00
|
|
|
}
|
|
|
|
|
2023-10-09 10:46:12 +00:00
|
|
|
diesel::table! {
|
Remove id column and use different primary key on some tables (#4093)
* post_saved
* fmt
* remove unique and not null
* put person_id first in primary key and remove index
* use post_saved.find
* change captcha_answer
* remove removal of not null
* comment_aggregates
* comment_like
* comment_saved
* aggregates
* remove "\"
* deduplicate site_aggregates
* person_post_aggregates
* community_moderator
* community_block
* community_person_ban
* custom_emoji_keyword
* federation allow/block list
* federation_queue_state
* instance_block
* local_site_rate_limit, local_user_language, login_token
* person_ban, person_block, person_follower, post_like, post_read, received_activity
* community_follower, community_language, site_language
* fmt
* image_upload
* remove unused newtypes
* remove more indexes
* use .find
* merge
* fix site_aggregates_site function
* fmt
* Primary keys dess (#17)
* Also order reports by oldest first (ref #4123) (#4129)
* Support signed fetch for federation (fixes #868) (#4125)
* Support signed fetch for federation (fixes #868)
* taplo
* add federation queue state to get_federated_instances api (#4104)
* add federation queue state to get_federated_instances api
* feature gate
* move retry sleep function
* move stuff around
* Add UI setting for collapsing bot comments. Fixes #3838 (#4098)
* Add UI setting for collapsing bot comments. Fixes #3838
* Fixing clippy check.
* Only keep sent and received activities for 7 days (fixes #4113, fixes #4110) (#4131)
* Only check auth secure on release mode. (#4127)
* Only check auth secure on release mode.
* Fixing wrong js-client.
* Adding is_debug_mode var.
* Fixing the desktop image on the README. (#4135)
* Delete dupes and add possibly missing unique constraint on person_aggregates.
* Fixing clippy lints.
---------
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
* fmt
* Update community_block.rs
* Update instance_block.rs
* Update person_block.rs
* Update person_block.rs
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
2023-11-13 13:14:07 +00:00
|
|
|
login_token (token) {
|
2023-10-09 10:46:12 +00:00
|
|
|
token -> Text,
|
|
|
|
user_id -> Int4,
|
|
|
|
published -> Timestamptz,
|
|
|
|
ip -> Nullable<Text>,
|
|
|
|
user_agent -> Nullable<Text>,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::table! {
|
|
|
|
mod_add (id) {
|
2020-05-06 02:06:24 +00:00
|
|
|
id -> Int4,
|
2021-02-26 13:49:58 +00:00
|
|
|
mod_person_id -> Int4,
|
|
|
|
other_person_id -> Int4,
|
2023-04-17 19:19:51 +00:00
|
|
|
removed -> Bool,
|
2023-08-24 15:27:00 +00:00
|
|
|
when_ -> Timestamptz,
|
2020-05-06 02:06:24 +00:00
|
|
|
}
|
2019-04-15 23:12:06 +00:00
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::table! {
|
|
|
|
mod_add_community (id) {
|
2021-08-17 21:52:28 +00:00
|
|
|
id -> Int4,
|
|
|
|
mod_person_id -> Int4,
|
|
|
|
other_person_id -> Int4,
|
|
|
|
community_id -> Int4,
|
2023-04-17 19:19:51 +00:00
|
|
|
removed -> Bool,
|
2023-08-24 15:27:00 +00:00
|
|
|
when_ -> Timestamptz,
|
2021-08-17 21:52:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::table! {
|
2020-05-06 02:06:24 +00:00
|
|
|
mod_ban (id) {
|
|
|
|
id -> Int4,
|
2021-02-26 13:49:58 +00:00
|
|
|
mod_person_id -> Int4,
|
|
|
|
other_person_id -> Int4,
|
2020-05-06 02:06:24 +00:00
|
|
|
reason -> Nullable<Text>,
|
2023-04-17 19:19:51 +00:00
|
|
|
banned -> Bool,
|
2023-08-24 15:27:00 +00:00
|
|
|
expires -> Nullable<Timestamptz>,
|
|
|
|
when_ -> Timestamptz,
|
2020-05-06 02:06:24 +00:00
|
|
|
}
|
2019-04-15 23:12:06 +00:00
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::table! {
|
2020-05-06 02:06:24 +00:00
|
|
|
mod_ban_from_community (id) {
|
|
|
|
id -> Int4,
|
2021-02-26 13:49:58 +00:00
|
|
|
mod_person_id -> Int4,
|
|
|
|
other_person_id -> Int4,
|
2020-05-06 02:06:24 +00:00
|
|
|
community_id -> Int4,
|
|
|
|
reason -> Nullable<Text>,
|
2023-04-17 19:19:51 +00:00
|
|
|
banned -> Bool,
|
2023-08-24 15:27:00 +00:00
|
|
|
expires -> Nullable<Timestamptz>,
|
|
|
|
when_ -> Timestamptz,
|
2020-05-06 02:06:24 +00:00
|
|
|
}
|
2019-04-15 23:12:06 +00:00
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::table! {
|
|
|
|
mod_feature_post (id) {
|
|
|
|
id -> Int4,
|
|
|
|
mod_person_id -> Int4,
|
|
|
|
post_id -> Int4,
|
|
|
|
featured -> Bool,
|
2023-08-24 15:27:00 +00:00
|
|
|
when_ -> Timestamptz,
|
2023-04-17 19:19:51 +00:00
|
|
|
is_featured_community -> Bool,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
diesel::table! {
|
|
|
|
mod_hide_community (id) {
|
|
|
|
id -> Int4,
|
|
|
|
community_id -> Int4,
|
|
|
|
mod_person_id -> Int4,
|
2023-08-24 15:27:00 +00:00
|
|
|
when_ -> Timestamptz,
|
2023-04-17 19:19:51 +00:00
|
|
|
reason -> Nullable<Text>,
|
|
|
|
hidden -> Bool,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
diesel::table! {
|
2020-05-06 02:06:24 +00:00
|
|
|
mod_lock_post (id) {
|
|
|
|
id -> Int4,
|
2021-02-26 13:49:58 +00:00
|
|
|
mod_person_id -> Int4,
|
2020-05-06 02:06:24 +00:00
|
|
|
post_id -> Int4,
|
2023-04-17 19:19:51 +00:00
|
|
|
locked -> Bool,
|
2023-08-24 15:27:00 +00:00
|
|
|
when_ -> Timestamptz,
|
2020-05-06 02:06:24 +00:00
|
|
|
}
|
2019-04-15 23:12:06 +00:00
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::table! {
|
2020-05-06 02:06:24 +00:00
|
|
|
mod_remove_comment (id) {
|
|
|
|
id -> Int4,
|
2021-02-26 13:49:58 +00:00
|
|
|
mod_person_id -> Int4,
|
2020-05-06 02:06:24 +00:00
|
|
|
comment_id -> Int4,
|
|
|
|
reason -> Nullable<Text>,
|
2023-04-17 19:19:51 +00:00
|
|
|
removed -> Bool,
|
2023-08-24 15:27:00 +00:00
|
|
|
when_ -> Timestamptz,
|
2020-05-06 02:06:24 +00:00
|
|
|
}
|
2019-04-15 23:12:06 +00:00
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::table! {
|
2020-05-06 02:06:24 +00:00
|
|
|
mod_remove_community (id) {
|
|
|
|
id -> Int4,
|
2021-02-26 13:49:58 +00:00
|
|
|
mod_person_id -> Int4,
|
2020-05-06 02:06:24 +00:00
|
|
|
community_id -> Int4,
|
|
|
|
reason -> Nullable<Text>,
|
2023-04-17 19:19:51 +00:00
|
|
|
removed -> Bool,
|
2023-08-24 15:27:00 +00:00
|
|
|
when_ -> Timestamptz,
|
2020-05-06 02:06:24 +00:00
|
|
|
}
|
2019-04-15 23:12:06 +00:00
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::table! {
|
2020-05-06 02:06:24 +00:00
|
|
|
mod_remove_post (id) {
|
|
|
|
id -> Int4,
|
2021-02-26 13:49:58 +00:00
|
|
|
mod_person_id -> Int4,
|
2020-05-06 02:06:24 +00:00
|
|
|
post_id -> Int4,
|
|
|
|
reason -> Nullable<Text>,
|
2023-04-17 19:19:51 +00:00
|
|
|
removed -> Bool,
|
2023-08-24 15:27:00 +00:00
|
|
|
when_ -> Timestamptz,
|
2020-05-06 02:06:24 +00:00
|
|
|
}
|
2019-09-09 06:14:13 +00:00
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::table! {
|
|
|
|
mod_transfer_community (id) {
|
2020-05-06 02:06:24 +00:00
|
|
|
id -> Int4,
|
2021-02-26 13:49:58 +00:00
|
|
|
mod_person_id -> Int4,
|
2023-04-17 19:19:51 +00:00
|
|
|
other_person_id -> Int4,
|
|
|
|
community_id -> Int4,
|
2023-08-24 15:27:00 +00:00
|
|
|
when_ -> Timestamptz,
|
2020-05-06 02:06:24 +00:00
|
|
|
}
|
2019-10-30 03:35:39 +00:00
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::table! {
|
2020-05-06 02:06:24 +00:00
|
|
|
password_reset_request (id) {
|
|
|
|
id -> Int4,
|
2023-08-02 17:02:53 +00:00
|
|
|
token -> Text,
|
2023-08-24 15:27:00 +00:00
|
|
|
published -> Timestamptz,
|
2021-02-26 13:49:58 +00:00
|
|
|
local_user_id -> Int4,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::table! {
|
2021-02-26 13:49:58 +00:00
|
|
|
person (id) {
|
|
|
|
id -> Int4,
|
2023-06-07 10:54:40 +00:00
|
|
|
#[max_length = 255]
|
2021-02-26 13:49:58 +00:00
|
|
|
name -> Varchar,
|
2023-06-07 10:54:40 +00:00
|
|
|
#[max_length = 255]
|
2021-04-01 17:57:45 +00:00
|
|
|
display_name -> Nullable<Varchar>,
|
2023-04-17 19:19:51 +00:00
|
|
|
avatar -> Nullable<Text>,
|
2021-02-26 13:49:58 +00:00
|
|
|
banned -> Bool,
|
2023-08-24 15:27:00 +00:00
|
|
|
published -> Timestamptz,
|
|
|
|
updated -> Nullable<Timestamptz>,
|
2023-06-07 10:54:40 +00:00
|
|
|
#[max_length = 255]
|
2021-02-26 13:49:58 +00:00
|
|
|
actor_id -> Varchar,
|
|
|
|
bio -> Nullable<Text>,
|
|
|
|
local -> Bool,
|
|
|
|
private_key -> Nullable<Text>,
|
2021-11-22 15:10:18 +00:00
|
|
|
public_key -> Text,
|
2023-08-24 15:27:00 +00:00
|
|
|
last_refreshed_at -> Timestamptz,
|
2023-04-17 19:19:51 +00:00
|
|
|
banner -> Nullable<Text>,
|
2021-02-26 13:49:58 +00:00
|
|
|
deleted -> Bool,
|
2023-06-07 10:54:40 +00:00
|
|
|
#[max_length = 255]
|
2021-02-26 13:49:58 +00:00
|
|
|
inbox_url -> Varchar,
|
2023-06-07 10:54:40 +00:00
|
|
|
#[max_length = 255]
|
2021-02-26 13:49:58 +00:00
|
|
|
shared_inbox_url -> Nullable<Varchar>,
|
2021-03-20 19:21:51 +00:00
|
|
|
matrix_user_id -> Nullable<Text>,
|
2021-04-21 21:41:14 +00:00
|
|
|
bot_account -> Bool,
|
2023-08-24 15:27:00 +00:00
|
|
|
ban_expires -> Nullable<Timestamptz>,
|
2022-10-27 09:24:07 +00:00
|
|
|
instance_id -> Int4,
|
2021-02-26 13:49:58 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::table! {
|
Remove id column and use different primary key on some tables (#4093)
* post_saved
* fmt
* remove unique and not null
* put person_id first in primary key and remove index
* use post_saved.find
* change captcha_answer
* remove removal of not null
* comment_aggregates
* comment_like
* comment_saved
* aggregates
* remove "\"
* deduplicate site_aggregates
* person_post_aggregates
* community_moderator
* community_block
* community_person_ban
* custom_emoji_keyword
* federation allow/block list
* federation_queue_state
* instance_block
* local_site_rate_limit, local_user_language, login_token
* person_ban, person_block, person_follower, post_like, post_read, received_activity
* community_follower, community_language, site_language
* fmt
* image_upload
* remove unused newtypes
* remove more indexes
* use .find
* merge
* fix site_aggregates_site function
* fmt
* Primary keys dess (#17)
* Also order reports by oldest first (ref #4123) (#4129)
* Support signed fetch for federation (fixes #868) (#4125)
* Support signed fetch for federation (fixes #868)
* taplo
* add federation queue state to get_federated_instances api (#4104)
* add federation queue state to get_federated_instances api
* feature gate
* move retry sleep function
* move stuff around
* Add UI setting for collapsing bot comments. Fixes #3838 (#4098)
* Add UI setting for collapsing bot comments. Fixes #3838
* Fixing clippy check.
* Only keep sent and received activities for 7 days (fixes #4113, fixes #4110) (#4131)
* Only check auth secure on release mode. (#4127)
* Only check auth secure on release mode.
* Fixing wrong js-client.
* Adding is_debug_mode var.
* Fixing the desktop image on the README. (#4135)
* Delete dupes and add possibly missing unique constraint on person_aggregates.
* Fixing clippy lints.
---------
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
* fmt
* Update community_block.rs
* Update instance_block.rs
* Update person_block.rs
* Update person_block.rs
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
2023-11-13 13:14:07 +00:00
|
|
|
person_aggregates (person_id) {
|
2021-02-26 13:49:58 +00:00
|
|
|
person_id -> Int4,
|
|
|
|
post_count -> Int8,
|
|
|
|
post_score -> Int8,
|
|
|
|
comment_count -> Int8,
|
|
|
|
comment_score -> Int8,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::table! {
|
Remove id column and use different primary key on some tables (#4093)
* post_saved
* fmt
* remove unique and not null
* put person_id first in primary key and remove index
* use post_saved.find
* change captcha_answer
* remove removal of not null
* comment_aggregates
* comment_like
* comment_saved
* aggregates
* remove "\"
* deduplicate site_aggregates
* person_post_aggregates
* community_moderator
* community_block
* community_person_ban
* custom_emoji_keyword
* federation allow/block list
* federation_queue_state
* instance_block
* local_site_rate_limit, local_user_language, login_token
* person_ban, person_block, person_follower, post_like, post_read, received_activity
* community_follower, community_language, site_language
* fmt
* image_upload
* remove unused newtypes
* remove more indexes
* use .find
* merge
* fix site_aggregates_site function
* fmt
* Primary keys dess (#17)
* Also order reports by oldest first (ref #4123) (#4129)
* Support signed fetch for federation (fixes #868) (#4125)
* Support signed fetch for federation (fixes #868)
* taplo
* add federation queue state to get_federated_instances api (#4104)
* add federation queue state to get_federated_instances api
* feature gate
* move retry sleep function
* move stuff around
* Add UI setting for collapsing bot comments. Fixes #3838 (#4098)
* Add UI setting for collapsing bot comments. Fixes #3838
* Fixing clippy check.
* Only keep sent and received activities for 7 days (fixes #4113, fixes #4110) (#4131)
* Only check auth secure on release mode. (#4127)
* Only check auth secure on release mode.
* Fixing wrong js-client.
* Adding is_debug_mode var.
* Fixing the desktop image on the README. (#4135)
* Delete dupes and add possibly missing unique constraint on person_aggregates.
* Fixing clippy lints.
---------
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
* fmt
* Update community_block.rs
* Update instance_block.rs
* Update person_block.rs
* Update person_block.rs
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
2023-11-13 13:14:07 +00:00
|
|
|
person_ban (person_id) {
|
2021-02-26 13:49:58 +00:00
|
|
|
person_id -> Int4,
|
2023-08-24 15:27:00 +00:00
|
|
|
published -> Timestamptz,
|
2021-02-26 13:49:58 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::table! {
|
Remove id column and use different primary key on some tables (#4093)
* post_saved
* fmt
* remove unique and not null
* put person_id first in primary key and remove index
* use post_saved.find
* change captcha_answer
* remove removal of not null
* comment_aggregates
* comment_like
* comment_saved
* aggregates
* remove "\"
* deduplicate site_aggregates
* person_post_aggregates
* community_moderator
* community_block
* community_person_ban
* custom_emoji_keyword
* federation allow/block list
* federation_queue_state
* instance_block
* local_site_rate_limit, local_user_language, login_token
* person_ban, person_block, person_follower, post_like, post_read, received_activity
* community_follower, community_language, site_language
* fmt
* image_upload
* remove unused newtypes
* remove more indexes
* use .find
* merge
* fix site_aggregates_site function
* fmt
* Primary keys dess (#17)
* Also order reports by oldest first (ref #4123) (#4129)
* Support signed fetch for federation (fixes #868) (#4125)
* Support signed fetch for federation (fixes #868)
* taplo
* add federation queue state to get_federated_instances api (#4104)
* add federation queue state to get_federated_instances api
* feature gate
* move retry sleep function
* move stuff around
* Add UI setting for collapsing bot comments. Fixes #3838 (#4098)
* Add UI setting for collapsing bot comments. Fixes #3838
* Fixing clippy check.
* Only keep sent and received activities for 7 days (fixes #4113, fixes #4110) (#4131)
* Only check auth secure on release mode. (#4127)
* Only check auth secure on release mode.
* Fixing wrong js-client.
* Adding is_debug_mode var.
* Fixing the desktop image on the README. (#4135)
* Delete dupes and add possibly missing unique constraint on person_aggregates.
* Fixing clippy lints.
---------
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
* fmt
* Update community_block.rs
* Update instance_block.rs
* Update person_block.rs
* Update person_block.rs
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
2023-11-13 13:14:07 +00:00
|
|
|
person_block (person_id, target_id) {
|
2023-04-17 19:19:51 +00:00
|
|
|
person_id -> Int4,
|
|
|
|
target_id -> Int4,
|
2023-08-24 15:27:00 +00:00
|
|
|
published -> Timestamptz,
|
2023-04-17 19:19:51 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
diesel::table! {
|
Remove id column and use different primary key on some tables (#4093)
* post_saved
* fmt
* remove unique and not null
* put person_id first in primary key and remove index
* use post_saved.find
* change captcha_answer
* remove removal of not null
* comment_aggregates
* comment_like
* comment_saved
* aggregates
* remove "\"
* deduplicate site_aggregates
* person_post_aggregates
* community_moderator
* community_block
* community_person_ban
* custom_emoji_keyword
* federation allow/block list
* federation_queue_state
* instance_block
* local_site_rate_limit, local_user_language, login_token
* person_ban, person_block, person_follower, post_like, post_read, received_activity
* community_follower, community_language, site_language
* fmt
* image_upload
* remove unused newtypes
* remove more indexes
* use .find
* merge
* fix site_aggregates_site function
* fmt
* Primary keys dess (#17)
* Also order reports by oldest first (ref #4123) (#4129)
* Support signed fetch for federation (fixes #868) (#4125)
* Support signed fetch for federation (fixes #868)
* taplo
* add federation queue state to get_federated_instances api (#4104)
* add federation queue state to get_federated_instances api
* feature gate
* move retry sleep function
* move stuff around
* Add UI setting for collapsing bot comments. Fixes #3838 (#4098)
* Add UI setting for collapsing bot comments. Fixes #3838
* Fixing clippy check.
* Only keep sent and received activities for 7 days (fixes #4113, fixes #4110) (#4131)
* Only check auth secure on release mode. (#4127)
* Only check auth secure on release mode.
* Fixing wrong js-client.
* Adding is_debug_mode var.
* Fixing the desktop image on the README. (#4135)
* Delete dupes and add possibly missing unique constraint on person_aggregates.
* Fixing clippy lints.
---------
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
* fmt
* Update community_block.rs
* Update instance_block.rs
* Update person_block.rs
* Update person_block.rs
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
2023-11-13 13:14:07 +00:00
|
|
|
person_follower (follower_id, person_id) {
|
2023-04-17 19:19:51 +00:00
|
|
|
person_id -> Int4,
|
|
|
|
follower_id -> Int4,
|
2023-08-24 15:27:00 +00:00
|
|
|
published -> Timestamptz,
|
2023-04-17 19:19:51 +00:00
|
|
|
pending -> Bool,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
diesel::table! {
|
2021-02-26 13:49:58 +00:00
|
|
|
person_mention (id) {
|
|
|
|
id -> Int4,
|
|
|
|
recipient_id -> Int4,
|
|
|
|
comment_id -> Int4,
|
|
|
|
read -> Bool,
|
2023-08-24 15:27:00 +00:00
|
|
|
published -> Timestamptz,
|
2020-05-06 02:06:24 +00:00
|
|
|
}
|
2019-03-04 16:39:07 +00:00
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::table! {
|
Remove id column and use different primary key on some tables (#4093)
* post_saved
* fmt
* remove unique and not null
* put person_id first in primary key and remove index
* use post_saved.find
* change captcha_answer
* remove removal of not null
* comment_aggregates
* comment_like
* comment_saved
* aggregates
* remove "\"
* deduplicate site_aggregates
* person_post_aggregates
* community_moderator
* community_block
* community_person_ban
* custom_emoji_keyword
* federation allow/block list
* federation_queue_state
* instance_block
* local_site_rate_limit, local_user_language, login_token
* person_ban, person_block, person_follower, post_like, post_read, received_activity
* community_follower, community_language, site_language
* fmt
* image_upload
* remove unused newtypes
* remove more indexes
* use .find
* merge
* fix site_aggregates_site function
* fmt
* Primary keys dess (#17)
* Also order reports by oldest first (ref #4123) (#4129)
* Support signed fetch for federation (fixes #868) (#4125)
* Support signed fetch for federation (fixes #868)
* taplo
* add federation queue state to get_federated_instances api (#4104)
* add federation queue state to get_federated_instances api
* feature gate
* move retry sleep function
* move stuff around
* Add UI setting for collapsing bot comments. Fixes #3838 (#4098)
* Add UI setting for collapsing bot comments. Fixes #3838
* Fixing clippy check.
* Only keep sent and received activities for 7 days (fixes #4113, fixes #4110) (#4131)
* Only check auth secure on release mode. (#4127)
* Only check auth secure on release mode.
* Fixing wrong js-client.
* Adding is_debug_mode var.
* Fixing the desktop image on the README. (#4135)
* Delete dupes and add possibly missing unique constraint on person_aggregates.
* Fixing clippy lints.
---------
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
* fmt
* Update community_block.rs
* Update instance_block.rs
* Update person_block.rs
* Update person_block.rs
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
2023-11-13 13:14:07 +00:00
|
|
|
person_post_aggregates (person_id, post_id) {
|
2023-04-17 19:19:51 +00:00
|
|
|
person_id -> Int4,
|
|
|
|
post_id -> Int4,
|
|
|
|
read_comments -> Int8,
|
2023-08-24 15:27:00 +00:00
|
|
|
published -> Timestamptz,
|
2022-07-30 03:55:59 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::table! {
|
2020-05-06 02:06:24 +00:00
|
|
|
post (id) {
|
|
|
|
id -> Int4,
|
2023-06-07 10:54:40 +00:00
|
|
|
#[max_length = 200]
|
2020-05-06 02:06:24 +00:00
|
|
|
name -> Varchar,
|
2023-06-08 20:15:15 +00:00
|
|
|
#[max_length = 512]
|
|
|
|
url -> Nullable<Varchar>,
|
2020-05-06 02:06:24 +00:00
|
|
|
body -> Nullable<Text>,
|
|
|
|
creator_id -> Int4,
|
|
|
|
community_id -> Int4,
|
|
|
|
removed -> Bool,
|
|
|
|
locked -> Bool,
|
2023-08-24 15:27:00 +00:00
|
|
|
published -> Timestamptz,
|
|
|
|
updated -> Nullable<Timestamptz>,
|
2020-05-06 02:06:24 +00:00
|
|
|
deleted -> Bool,
|
|
|
|
nsfw -> Bool,
|
|
|
|
embed_title -> Nullable<Text>,
|
|
|
|
embed_description -> Nullable<Text>,
|
|
|
|
thumbnail_url -> Nullable<Text>,
|
2023-06-07 10:54:40 +00:00
|
|
|
#[max_length = 255]
|
2020-05-06 02:06:24 +00:00
|
|
|
ap_id -> Varchar,
|
|
|
|
local -> Bool,
|
2023-04-17 19:19:51 +00:00
|
|
|
embed_video_url -> Nullable<Text>,
|
2022-08-18 19:11:19 +00:00
|
|
|
language_id -> Int4,
|
2022-12-12 11:17:10 +00:00
|
|
|
featured_community -> Bool,
|
|
|
|
featured_local -> Bool,
|
2020-05-06 02:06:24 +00:00
|
|
|
}
|
2019-02-28 06:02:55 +00:00
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::table! {
|
Remove id column and use different primary key on some tables (#4093)
* post_saved
* fmt
* remove unique and not null
* put person_id first in primary key and remove index
* use post_saved.find
* change captcha_answer
* remove removal of not null
* comment_aggregates
* comment_like
* comment_saved
* aggregates
* remove "\"
* deduplicate site_aggregates
* person_post_aggregates
* community_moderator
* community_block
* community_person_ban
* custom_emoji_keyword
* federation allow/block list
* federation_queue_state
* instance_block
* local_site_rate_limit, local_user_language, login_token
* person_ban, person_block, person_follower, post_like, post_read, received_activity
* community_follower, community_language, site_language
* fmt
* image_upload
* remove unused newtypes
* remove more indexes
* use .find
* merge
* fix site_aggregates_site function
* fmt
* Primary keys dess (#17)
* Also order reports by oldest first (ref #4123) (#4129)
* Support signed fetch for federation (fixes #868) (#4125)
* Support signed fetch for federation (fixes #868)
* taplo
* add federation queue state to get_federated_instances api (#4104)
* add federation queue state to get_federated_instances api
* feature gate
* move retry sleep function
* move stuff around
* Add UI setting for collapsing bot comments. Fixes #3838 (#4098)
* Add UI setting for collapsing bot comments. Fixes #3838
* Fixing clippy check.
* Only keep sent and received activities for 7 days (fixes #4113, fixes #4110) (#4131)
* Only check auth secure on release mode. (#4127)
* Only check auth secure on release mode.
* Fixing wrong js-client.
* Adding is_debug_mode var.
* Fixing the desktop image on the README. (#4135)
* Delete dupes and add possibly missing unique constraint on person_aggregates.
* Fixing clippy lints.
---------
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
* fmt
* Update community_block.rs
* Update instance_block.rs
* Update person_block.rs
* Update person_block.rs
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
2023-11-13 13:14:07 +00:00
|
|
|
post_aggregates (post_id) {
|
2020-12-10 20:53:49 +00:00
|
|
|
post_id -> Int4,
|
|
|
|
comments -> Int8,
|
|
|
|
score -> Int8,
|
|
|
|
upvotes -> Int8,
|
|
|
|
downvotes -> Int8,
|
2023-08-24 15:27:00 +00:00
|
|
|
published -> Timestamptz,
|
|
|
|
newest_comment_time_necro -> Timestamptz,
|
|
|
|
newest_comment_time -> Timestamptz,
|
2022-12-12 11:17:10 +00:00
|
|
|
featured_community -> Bool,
|
|
|
|
featured_local -> Bool,
|
2023-09-06 17:43:27 +00:00
|
|
|
hot_rank -> Float8,
|
|
|
|
hot_rank_active -> Float8,
|
2023-07-20 15:13:21 +00:00
|
|
|
community_id -> Int4,
|
|
|
|
creator_id -> Int4,
|
2023-07-26 17:07:05 +00:00
|
|
|
controversy_rank -> Float8,
|
2023-09-20 09:56:13 +00:00
|
|
|
instance_id -> Int4,
|
2023-09-06 17:43:27 +00:00
|
|
|
scaled_rank -> Float8,
|
2020-12-10 20:53:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::table! {
|
Remove id column and use different primary key on some tables (#4093)
* post_saved
* fmt
* remove unique and not null
* put person_id first in primary key and remove index
* use post_saved.find
* change captcha_answer
* remove removal of not null
* comment_aggregates
* comment_like
* comment_saved
* aggregates
* remove "\"
* deduplicate site_aggregates
* person_post_aggregates
* community_moderator
* community_block
* community_person_ban
* custom_emoji_keyword
* federation allow/block list
* federation_queue_state
* instance_block
* local_site_rate_limit, local_user_language, login_token
* person_ban, person_block, person_follower, post_like, post_read, received_activity
* community_follower, community_language, site_language
* fmt
* image_upload
* remove unused newtypes
* remove more indexes
* use .find
* merge
* fix site_aggregates_site function
* fmt
* Primary keys dess (#17)
* Also order reports by oldest first (ref #4123) (#4129)
* Support signed fetch for federation (fixes #868) (#4125)
* Support signed fetch for federation (fixes #868)
* taplo
* add federation queue state to get_federated_instances api (#4104)
* add federation queue state to get_federated_instances api
* feature gate
* move retry sleep function
* move stuff around
* Add UI setting for collapsing bot comments. Fixes #3838 (#4098)
* Add UI setting for collapsing bot comments. Fixes #3838
* Fixing clippy check.
* Only keep sent and received activities for 7 days (fixes #4113, fixes #4110) (#4131)
* Only check auth secure on release mode. (#4127)
* Only check auth secure on release mode.
* Fixing wrong js-client.
* Adding is_debug_mode var.
* Fixing the desktop image on the README. (#4135)
* Delete dupes and add possibly missing unique constraint on person_aggregates.
* Fixing clippy lints.
---------
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
* fmt
* Update community_block.rs
* Update instance_block.rs
* Update person_block.rs
* Update person_block.rs
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
2023-11-13 13:14:07 +00:00
|
|
|
post_like (person_id, post_id) {
|
2020-05-06 02:06:24 +00:00
|
|
|
post_id -> Int4,
|
2021-02-26 13:49:58 +00:00
|
|
|
person_id -> Int4,
|
2020-05-06 02:06:24 +00:00
|
|
|
score -> Int2,
|
2023-08-24 15:27:00 +00:00
|
|
|
published -> Timestamptz,
|
2020-05-06 02:06:24 +00:00
|
|
|
}
|
2019-04-20 04:06:25 +00:00
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::table! {
|
Remove id column and use different primary key on some tables (#4093)
* post_saved
* fmt
* remove unique and not null
* put person_id first in primary key and remove index
* use post_saved.find
* change captcha_answer
* remove removal of not null
* comment_aggregates
* comment_like
* comment_saved
* aggregates
* remove "\"
* deduplicate site_aggregates
* person_post_aggregates
* community_moderator
* community_block
* community_person_ban
* custom_emoji_keyword
* federation allow/block list
* federation_queue_state
* instance_block
* local_site_rate_limit, local_user_language, login_token
* person_ban, person_block, person_follower, post_like, post_read, received_activity
* community_follower, community_language, site_language
* fmt
* image_upload
* remove unused newtypes
* remove more indexes
* use .find
* merge
* fix site_aggregates_site function
* fmt
* Primary keys dess (#17)
* Also order reports by oldest first (ref #4123) (#4129)
* Support signed fetch for federation (fixes #868) (#4125)
* Support signed fetch for federation (fixes #868)
* taplo
* add federation queue state to get_federated_instances api (#4104)
* add federation queue state to get_federated_instances api
* feature gate
* move retry sleep function
* move stuff around
* Add UI setting for collapsing bot comments. Fixes #3838 (#4098)
* Add UI setting for collapsing bot comments. Fixes #3838
* Fixing clippy check.
* Only keep sent and received activities for 7 days (fixes #4113, fixes #4110) (#4131)
* Only check auth secure on release mode. (#4127)
* Only check auth secure on release mode.
* Fixing wrong js-client.
* Adding is_debug_mode var.
* Fixing the desktop image on the README. (#4135)
* Delete dupes and add possibly missing unique constraint on person_aggregates.
* Fixing clippy lints.
---------
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
* fmt
* Update community_block.rs
* Update instance_block.rs
* Update person_block.rs
* Update person_block.rs
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
2023-11-13 13:14:07 +00:00
|
|
|
post_read (person_id, post_id) {
|
2020-05-06 02:06:24 +00:00
|
|
|
post_id -> Int4,
|
2021-02-26 13:49:58 +00:00
|
|
|
person_id -> Int4,
|
2023-08-24 15:27:00 +00:00
|
|
|
published -> Timestamptz,
|
2020-05-06 02:06:24 +00:00
|
|
|
}
|
2019-04-20 04:06:25 +00:00
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::table! {
|
2020-10-13 23:32:35 +00:00
|
|
|
post_report (id) {
|
2020-10-21 00:31:01 +00:00
|
|
|
id -> Int4,
|
|
|
|
creator_id -> Int4,
|
2020-10-13 23:32:35 +00:00
|
|
|
post_id -> Int4,
|
2023-06-07 10:54:40 +00:00
|
|
|
#[max_length = 200]
|
2020-11-04 02:15:11 +00:00
|
|
|
original_post_name -> Varchar,
|
|
|
|
original_post_url -> Nullable<Text>,
|
|
|
|
original_post_body -> Nullable<Text>,
|
2020-10-21 00:31:01 +00:00
|
|
|
reason -> Text,
|
|
|
|
resolved -> Bool,
|
|
|
|
resolver_id -> Nullable<Int4>,
|
2023-08-24 15:27:00 +00:00
|
|
|
published -> Timestamptz,
|
|
|
|
updated -> Nullable<Timestamptz>,
|
2020-10-13 23:32:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::table! {
|
Remove id column and use different primary key on some tables (#4093)
* post_saved
* fmt
* remove unique and not null
* put person_id first in primary key and remove index
* use post_saved.find
* change captcha_answer
* remove removal of not null
* comment_aggregates
* comment_like
* comment_saved
* aggregates
* remove "\"
* deduplicate site_aggregates
* person_post_aggregates
* community_moderator
* community_block
* community_person_ban
* custom_emoji_keyword
* federation allow/block list
* federation_queue_state
* instance_block
* local_site_rate_limit, local_user_language, login_token
* person_ban, person_block, person_follower, post_like, post_read, received_activity
* community_follower, community_language, site_language
* fmt
* image_upload
* remove unused newtypes
* remove more indexes
* use .find
* merge
* fix site_aggregates_site function
* fmt
* Primary keys dess (#17)
* Also order reports by oldest first (ref #4123) (#4129)
* Support signed fetch for federation (fixes #868) (#4125)
* Support signed fetch for federation (fixes #868)
* taplo
* add federation queue state to get_federated_instances api (#4104)
* add federation queue state to get_federated_instances api
* feature gate
* move retry sleep function
* move stuff around
* Add UI setting for collapsing bot comments. Fixes #3838 (#4098)
* Add UI setting for collapsing bot comments. Fixes #3838
* Fixing clippy check.
* Only keep sent and received activities for 7 days (fixes #4113, fixes #4110) (#4131)
* Only check auth secure on release mode. (#4127)
* Only check auth secure on release mode.
* Fixing wrong js-client.
* Adding is_debug_mode var.
* Fixing the desktop image on the README. (#4135)
* Delete dupes and add possibly missing unique constraint on person_aggregates.
* Fixing clippy lints.
---------
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
* fmt
* Update community_block.rs
* Update instance_block.rs
* Update person_block.rs
* Update person_block.rs
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
2023-11-13 13:14:07 +00:00
|
|
|
post_saved (person_id, post_id) {
|
2020-05-06 02:06:24 +00:00
|
|
|
post_id -> Int4,
|
2021-02-26 13:49:58 +00:00
|
|
|
person_id -> Int4,
|
2023-08-24 15:27:00 +00:00
|
|
|
published -> Timestamptz,
|
2020-05-06 02:06:24 +00:00
|
|
|
}
|
2020-01-22 21:35:29 +00:00
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::table! {
|
2020-05-06 02:06:24 +00:00
|
|
|
private_message (id) {
|
|
|
|
id -> Int4,
|
|
|
|
creator_id -> Int4,
|
|
|
|
recipient_id -> Int4,
|
|
|
|
content -> Text,
|
|
|
|
deleted -> Bool,
|
|
|
|
read -> Bool,
|
2023-08-24 15:27:00 +00:00
|
|
|
published -> Timestamptz,
|
|
|
|
updated -> Nullable<Timestamptz>,
|
2023-06-07 10:54:40 +00:00
|
|
|
#[max_length = 255]
|
2020-05-06 02:06:24 +00:00
|
|
|
ap_id -> Varchar,
|
|
|
|
local -> Bool,
|
|
|
|
}
|
2019-04-16 23:04:23 +00:00
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::table! {
|
2022-09-19 22:58:42 +00:00
|
|
|
private_message_report (id) {
|
|
|
|
id -> Int4,
|
|
|
|
creator_id -> Int4,
|
|
|
|
private_message_id -> Int4,
|
|
|
|
original_pm_text -> Text,
|
|
|
|
reason -> Text,
|
|
|
|
resolved -> Bool,
|
|
|
|
resolver_id -> Nullable<Int4>,
|
2023-08-24 15:27:00 +00:00
|
|
|
published -> Timestamptz,
|
|
|
|
updated -> Nullable<Timestamptz>,
|
2022-09-19 22:58:42 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-14 15:17:06 +00:00
|
|
|
diesel::table! {
|
Remove id column and use different primary key on some tables (#4093)
* post_saved
* fmt
* remove unique and not null
* put person_id first in primary key and remove index
* use post_saved.find
* change captcha_answer
* remove removal of not null
* comment_aggregates
* comment_like
* comment_saved
* aggregates
* remove "\"
* deduplicate site_aggregates
* person_post_aggregates
* community_moderator
* community_block
* community_person_ban
* custom_emoji_keyword
* federation allow/block list
* federation_queue_state
* instance_block
* local_site_rate_limit, local_user_language, login_token
* person_ban, person_block, person_follower, post_like, post_read, received_activity
* community_follower, community_language, site_language
* fmt
* image_upload
* remove unused newtypes
* remove more indexes
* use .find
* merge
* fix site_aggregates_site function
* fmt
* Primary keys dess (#17)
* Also order reports by oldest first (ref #4123) (#4129)
* Support signed fetch for federation (fixes #868) (#4125)
* Support signed fetch for federation (fixes #868)
* taplo
* add federation queue state to get_federated_instances api (#4104)
* add federation queue state to get_federated_instances api
* feature gate
* move retry sleep function
* move stuff around
* Add UI setting for collapsing bot comments. Fixes #3838 (#4098)
* Add UI setting for collapsing bot comments. Fixes #3838
* Fixing clippy check.
* Only keep sent and received activities for 7 days (fixes #4113, fixes #4110) (#4131)
* Only check auth secure on release mode. (#4127)
* Only check auth secure on release mode.
* Fixing wrong js-client.
* Adding is_debug_mode var.
* Fixing the desktop image on the README. (#4135)
* Delete dupes and add possibly missing unique constraint on person_aggregates.
* Fixing clippy lints.
---------
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
* fmt
* Update community_block.rs
* Update instance_block.rs
* Update person_block.rs
* Update person_block.rs
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
2023-11-13 13:14:07 +00:00
|
|
|
received_activity (ap_id) {
|
2023-07-14 15:17:06 +00:00
|
|
|
ap_id -> Text,
|
2023-08-24 15:27:00 +00:00
|
|
|
published -> Timestamptz,
|
2023-07-14 15:17:06 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::table! {
|
|
|
|
registration_application (id) {
|
|
|
|
id -> Int4,
|
|
|
|
local_user_id -> Int4,
|
|
|
|
answer -> Text,
|
|
|
|
admin_id -> Nullable<Int4>,
|
|
|
|
deny_reason -> Nullable<Text>,
|
2023-08-24 15:27:00 +00:00
|
|
|
published -> Timestamptz,
|
2023-04-17 19:19:51 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
diesel::table! {
|
|
|
|
secret (id) {
|
|
|
|
id -> Int4,
|
|
|
|
jwt_secret -> Varchar,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-14 15:17:06 +00:00
|
|
|
diesel::table! {
|
2023-09-09 16:25:03 +00:00
|
|
|
use diesel::sql_types::*;
|
|
|
|
use super::sql_types::ActorTypeEnum;
|
|
|
|
|
2023-07-14 15:17:06 +00:00
|
|
|
sent_activity (id) {
|
|
|
|
id -> Int8,
|
|
|
|
ap_id -> Text,
|
|
|
|
data -> Json,
|
|
|
|
sensitive -> Bool,
|
2023-08-24 15:27:00 +00:00
|
|
|
published -> Timestamptz,
|
2023-09-09 16:25:03 +00:00
|
|
|
send_inboxes -> Array<Nullable<Text>>,
|
|
|
|
send_community_followers_of -> Nullable<Int4>,
|
|
|
|
send_all_instances -> Bool,
|
|
|
|
actor_type -> ActorTypeEnum,
|
|
|
|
actor_apub_id -> Nullable<Text>,
|
2023-07-14 15:17:06 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::table! {
|
2020-05-06 02:06:24 +00:00
|
|
|
site (id) {
|
|
|
|
id -> Int4,
|
2023-06-07 10:54:40 +00:00
|
|
|
#[max_length = 20]
|
2020-05-06 02:06:24 +00:00
|
|
|
name -> Varchar,
|
2021-04-07 11:40:35 +00:00
|
|
|
sidebar -> Nullable<Text>,
|
2023-08-24 15:27:00 +00:00
|
|
|
published -> Timestamptz,
|
|
|
|
updated -> Nullable<Timestamptz>,
|
2023-04-17 19:19:51 +00:00
|
|
|
icon -> Nullable<Text>,
|
|
|
|
banner -> Nullable<Text>,
|
2023-06-07 10:54:40 +00:00
|
|
|
#[max_length = 150]
|
2023-04-17 19:19:51 +00:00
|
|
|
description -> Nullable<Varchar>,
|
2023-06-07 10:54:40 +00:00
|
|
|
#[max_length = 255]
|
2023-04-17 19:19:51 +00:00
|
|
|
actor_id -> Varchar,
|
2023-08-24 15:27:00 +00:00
|
|
|
last_refreshed_at -> Timestamptz,
|
2023-06-07 10:54:40 +00:00
|
|
|
#[max_length = 255]
|
2023-04-17 19:19:51 +00:00
|
|
|
inbox_url -> Varchar,
|
2022-02-07 19:23:12 +00:00
|
|
|
private_key -> Nullable<Text>,
|
|
|
|
public_key -> Text,
|
2022-10-27 09:24:07 +00:00
|
|
|
instance_id -> Int4,
|
2020-05-06 02:06:24 +00:00
|
|
|
}
|
2019-02-28 06:02:55 +00:00
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::table! {
|
Remove id column and use different primary key on some tables (#4093)
* post_saved
* fmt
* remove unique and not null
* put person_id first in primary key and remove index
* use post_saved.find
* change captcha_answer
* remove removal of not null
* comment_aggregates
* comment_like
* comment_saved
* aggregates
* remove "\"
* deduplicate site_aggregates
* person_post_aggregates
* community_moderator
* community_block
* community_person_ban
* custom_emoji_keyword
* federation allow/block list
* federation_queue_state
* instance_block
* local_site_rate_limit, local_user_language, login_token
* person_ban, person_block, person_follower, post_like, post_read, received_activity
* community_follower, community_language, site_language
* fmt
* image_upload
* remove unused newtypes
* remove more indexes
* use .find
* merge
* fix site_aggregates_site function
* fmt
* Primary keys dess (#17)
* Also order reports by oldest first (ref #4123) (#4129)
* Support signed fetch for federation (fixes #868) (#4125)
* Support signed fetch for federation (fixes #868)
* taplo
* add federation queue state to get_federated_instances api (#4104)
* add federation queue state to get_federated_instances api
* feature gate
* move retry sleep function
* move stuff around
* Add UI setting for collapsing bot comments. Fixes #3838 (#4098)
* Add UI setting for collapsing bot comments. Fixes #3838
* Fixing clippy check.
* Only keep sent and received activities for 7 days (fixes #4113, fixes #4110) (#4131)
* Only check auth secure on release mode. (#4127)
* Only check auth secure on release mode.
* Fixing wrong js-client.
* Adding is_debug_mode var.
* Fixing the desktop image on the README. (#4135)
* Delete dupes and add possibly missing unique constraint on person_aggregates.
* Fixing clippy lints.
---------
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
* fmt
* Update community_block.rs
* Update instance_block.rs
* Update person_block.rs
* Update person_block.rs
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
2023-11-13 13:14:07 +00:00
|
|
|
site_aggregates (site_id) {
|
2020-12-20 01:10:47 +00:00
|
|
|
site_id -> Int4,
|
2020-12-03 03:39:31 +00:00
|
|
|
users -> Int8,
|
|
|
|
posts -> Int8,
|
|
|
|
comments -> Int8,
|
|
|
|
communities -> Int8,
|
2021-01-29 16:38:27 +00:00
|
|
|
users_active_day -> Int8,
|
|
|
|
users_active_week -> Int8,
|
|
|
|
users_active_month -> Int8,
|
|
|
|
users_active_half_year -> Int8,
|
2020-12-03 03:39:31 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::table! {
|
Remove id column and use different primary key on some tables (#4093)
* post_saved
* fmt
* remove unique and not null
* put person_id first in primary key and remove index
* use post_saved.find
* change captcha_answer
* remove removal of not null
* comment_aggregates
* comment_like
* comment_saved
* aggregates
* remove "\"
* deduplicate site_aggregates
* person_post_aggregates
* community_moderator
* community_block
* community_person_ban
* custom_emoji_keyword
* federation allow/block list
* federation_queue_state
* instance_block
* local_site_rate_limit, local_user_language, login_token
* person_ban, person_block, person_follower, post_like, post_read, received_activity
* community_follower, community_language, site_language
* fmt
* image_upload
* remove unused newtypes
* remove more indexes
* use .find
* merge
* fix site_aggregates_site function
* fmt
* Primary keys dess (#17)
* Also order reports by oldest first (ref #4123) (#4129)
* Support signed fetch for federation (fixes #868) (#4125)
* Support signed fetch for federation (fixes #868)
* taplo
* add federation queue state to get_federated_instances api (#4104)
* add federation queue state to get_federated_instances api
* feature gate
* move retry sleep function
* move stuff around
* Add UI setting for collapsing bot comments. Fixes #3838 (#4098)
* Add UI setting for collapsing bot comments. Fixes #3838
* Fixing clippy check.
* Only keep sent and received activities for 7 days (fixes #4113, fixes #4110) (#4131)
* Only check auth secure on release mode. (#4127)
* Only check auth secure on release mode.
* Fixing wrong js-client.
* Adding is_debug_mode var.
* Fixing the desktop image on the README. (#4135)
* Delete dupes and add possibly missing unique constraint on person_aggregates.
* Fixing clippy lints.
---------
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
* fmt
* Update community_block.rs
* Update instance_block.rs
* Update person_block.rs
* Update person_block.rs
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
2023-11-13 13:14:07 +00:00
|
|
|
site_language (site_id, language_id) {
|
2022-10-06 18:27:58 +00:00
|
|
|
site_id -> Int4,
|
|
|
|
language_id -> Int4,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::table! {
|
|
|
|
tagline (id) {
|
2022-10-06 18:27:58 +00:00
|
|
|
id -> Int4,
|
2023-04-17 19:19:51 +00:00
|
|
|
local_site_id -> Int4,
|
|
|
|
content -> Text,
|
2023-08-24 15:27:00 +00:00
|
|
|
published -> Timestamptz,
|
|
|
|
updated -> Nullable<Timestamptz>,
|
2022-11-23 23:40:47 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::joinable!(admin_purge_comment -> person (admin_person_id));
|
|
|
|
diesel::joinable!(admin_purge_comment -> post (post_id));
|
|
|
|
diesel::joinable!(admin_purge_community -> person (admin_person_id));
|
|
|
|
diesel::joinable!(admin_purge_person -> person (admin_person_id));
|
|
|
|
diesel::joinable!(admin_purge_post -> community (community_id));
|
|
|
|
diesel::joinable!(admin_purge_post -> person (admin_person_id));
|
|
|
|
diesel::joinable!(comment -> language (language_id));
|
|
|
|
diesel::joinable!(comment -> person (creator_id));
|
|
|
|
diesel::joinable!(comment -> post (post_id));
|
|
|
|
diesel::joinable!(comment_aggregates -> comment (comment_id));
|
|
|
|
diesel::joinable!(comment_like -> comment (comment_id));
|
|
|
|
diesel::joinable!(comment_like -> person (person_id));
|
|
|
|
diesel::joinable!(comment_like -> post (post_id));
|
|
|
|
diesel::joinable!(comment_reply -> comment (comment_id));
|
|
|
|
diesel::joinable!(comment_reply -> person (recipient_id));
|
|
|
|
diesel::joinable!(comment_report -> comment (comment_id));
|
|
|
|
diesel::joinable!(comment_saved -> comment (comment_id));
|
|
|
|
diesel::joinable!(comment_saved -> person (person_id));
|
|
|
|
diesel::joinable!(community -> instance (instance_id));
|
|
|
|
diesel::joinable!(community_aggregates -> community (community_id));
|
|
|
|
diesel::joinable!(community_block -> community (community_id));
|
|
|
|
diesel::joinable!(community_block -> person (person_id));
|
|
|
|
diesel::joinable!(community_follower -> community (community_id));
|
|
|
|
diesel::joinable!(community_follower -> person (person_id));
|
|
|
|
diesel::joinable!(community_language -> community (community_id));
|
|
|
|
diesel::joinable!(community_language -> language (language_id));
|
|
|
|
diesel::joinable!(community_moderator -> community (community_id));
|
|
|
|
diesel::joinable!(community_moderator -> person (person_id));
|
|
|
|
diesel::joinable!(community_person_ban -> community (community_id));
|
|
|
|
diesel::joinable!(community_person_ban -> person (person_id));
|
|
|
|
diesel::joinable!(custom_emoji -> local_site (local_site_id));
|
|
|
|
diesel::joinable!(custom_emoji_keyword -> custom_emoji (custom_emoji_id));
|
|
|
|
diesel::joinable!(email_verification -> local_user (local_user_id));
|
|
|
|
diesel::joinable!(federation_allowlist -> instance (instance_id));
|
|
|
|
diesel::joinable!(federation_blocklist -> instance (instance_id));
|
2023-09-09 16:25:03 +00:00
|
|
|
diesel::joinable!(federation_queue_state -> instance (instance_id));
|
2023-09-06 17:43:27 +00:00
|
|
|
diesel::joinable!(image_upload -> local_user (local_user_id));
|
2023-09-20 09:56:13 +00:00
|
|
|
diesel::joinable!(instance_block -> instance (instance_id));
|
|
|
|
diesel::joinable!(instance_block -> person (person_id));
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::joinable!(local_site -> site (site_id));
|
|
|
|
diesel::joinable!(local_site_rate_limit -> local_site (local_site_id));
|
|
|
|
diesel::joinable!(local_user -> person (person_id));
|
|
|
|
diesel::joinable!(local_user_language -> language (language_id));
|
|
|
|
diesel::joinable!(local_user_language -> local_user (local_user_id));
|
2023-10-09 10:46:12 +00:00
|
|
|
diesel::joinable!(login_token -> local_user (user_id));
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::joinable!(mod_add_community -> community (community_id));
|
|
|
|
diesel::joinable!(mod_ban_from_community -> community (community_id));
|
|
|
|
diesel::joinable!(mod_feature_post -> person (mod_person_id));
|
|
|
|
diesel::joinable!(mod_feature_post -> post (post_id));
|
|
|
|
diesel::joinable!(mod_hide_community -> community (community_id));
|
|
|
|
diesel::joinable!(mod_hide_community -> person (mod_person_id));
|
|
|
|
diesel::joinable!(mod_lock_post -> person (mod_person_id));
|
|
|
|
diesel::joinable!(mod_lock_post -> post (post_id));
|
|
|
|
diesel::joinable!(mod_remove_comment -> comment (comment_id));
|
|
|
|
diesel::joinable!(mod_remove_comment -> person (mod_person_id));
|
|
|
|
diesel::joinable!(mod_remove_community -> community (community_id));
|
|
|
|
diesel::joinable!(mod_remove_community -> person (mod_person_id));
|
|
|
|
diesel::joinable!(mod_remove_post -> person (mod_person_id));
|
|
|
|
diesel::joinable!(mod_remove_post -> post (post_id));
|
|
|
|
diesel::joinable!(mod_transfer_community -> community (community_id));
|
|
|
|
diesel::joinable!(password_reset_request -> local_user (local_user_id));
|
|
|
|
diesel::joinable!(person -> instance (instance_id));
|
|
|
|
diesel::joinable!(person_aggregates -> person (person_id));
|
|
|
|
diesel::joinable!(person_ban -> person (person_id));
|
|
|
|
diesel::joinable!(person_mention -> comment (comment_id));
|
|
|
|
diesel::joinable!(person_mention -> person (recipient_id));
|
|
|
|
diesel::joinable!(person_post_aggregates -> person (person_id));
|
|
|
|
diesel::joinable!(person_post_aggregates -> post (post_id));
|
|
|
|
diesel::joinable!(post -> community (community_id));
|
|
|
|
diesel::joinable!(post -> language (language_id));
|
|
|
|
diesel::joinable!(post -> person (creator_id));
|
2023-07-20 15:13:21 +00:00
|
|
|
diesel::joinable!(post_aggregates -> community (community_id));
|
2023-09-20 09:56:13 +00:00
|
|
|
diesel::joinable!(post_aggregates -> instance (instance_id));
|
2023-07-20 15:13:21 +00:00
|
|
|
diesel::joinable!(post_aggregates -> person (creator_id));
|
2023-04-17 19:19:51 +00:00
|
|
|
diesel::joinable!(post_aggregates -> post (post_id));
|
|
|
|
diesel::joinable!(post_like -> person (person_id));
|
|
|
|
diesel::joinable!(post_like -> post (post_id));
|
|
|
|
diesel::joinable!(post_read -> person (person_id));
|
|
|
|
diesel::joinable!(post_read -> post (post_id));
|
|
|
|
diesel::joinable!(post_report -> post (post_id));
|
|
|
|
diesel::joinable!(post_saved -> person (person_id));
|
|
|
|
diesel::joinable!(post_saved -> post (post_id));
|
|
|
|
diesel::joinable!(private_message_report -> private_message (private_message_id));
|
|
|
|
diesel::joinable!(registration_application -> local_user (local_user_id));
|
|
|
|
diesel::joinable!(registration_application -> person (admin_id));
|
|
|
|
diesel::joinable!(site -> instance (instance_id));
|
|
|
|
diesel::joinable!(site_aggregates -> site (site_id));
|
|
|
|
diesel::joinable!(site_language -> language (language_id));
|
|
|
|
diesel::joinable!(site_language -> site (site_id));
|
|
|
|
diesel::joinable!(tagline -> local_site (local_site_id));
|
|
|
|
|
|
|
|
diesel::allow_tables_to_appear_in_same_query!(
|
|
|
|
admin_purge_comment,
|
|
|
|
admin_purge_community,
|
|
|
|
admin_purge_person,
|
|
|
|
admin_purge_post,
|
2023-06-27 10:38:53 +00:00
|
|
|
captcha_answer,
|
2023-04-17 19:19:51 +00:00
|
|
|
comment,
|
|
|
|
comment_aggregates,
|
|
|
|
comment_like,
|
|
|
|
comment_reply,
|
|
|
|
comment_report,
|
|
|
|
comment_saved,
|
|
|
|
community,
|
|
|
|
community_aggregates,
|
|
|
|
community_block,
|
|
|
|
community_follower,
|
|
|
|
community_language,
|
|
|
|
community_moderator,
|
|
|
|
community_person_ban,
|
|
|
|
custom_emoji,
|
|
|
|
custom_emoji_keyword,
|
|
|
|
email_verification,
|
|
|
|
federation_allowlist,
|
|
|
|
federation_blocklist,
|
2023-09-09 16:25:03 +00:00
|
|
|
federation_queue_state,
|
2023-09-06 17:43:27 +00:00
|
|
|
image_upload,
|
2023-04-17 19:19:51 +00:00
|
|
|
instance,
|
2023-09-20 09:56:13 +00:00
|
|
|
instance_block,
|
2023-04-17 19:19:51 +00:00
|
|
|
language,
|
|
|
|
local_site,
|
|
|
|
local_site_rate_limit,
|
|
|
|
local_user,
|
|
|
|
local_user_language,
|
2023-10-09 10:46:12 +00:00
|
|
|
login_token,
|
2023-04-17 19:19:51 +00:00
|
|
|
mod_add,
|
|
|
|
mod_add_community,
|
|
|
|
mod_ban,
|
|
|
|
mod_ban_from_community,
|
|
|
|
mod_feature_post,
|
|
|
|
mod_hide_community,
|
|
|
|
mod_lock_post,
|
|
|
|
mod_remove_comment,
|
|
|
|
mod_remove_community,
|
|
|
|
mod_remove_post,
|
|
|
|
mod_transfer_community,
|
|
|
|
password_reset_request,
|
|
|
|
person,
|
|
|
|
person_aggregates,
|
|
|
|
person_ban,
|
|
|
|
person_block,
|
|
|
|
person_follower,
|
|
|
|
person_mention,
|
|
|
|
person_post_aggregates,
|
|
|
|
post,
|
|
|
|
post_aggregates,
|
|
|
|
post_like,
|
|
|
|
post_read,
|
|
|
|
post_report,
|
|
|
|
post_saved,
|
|
|
|
private_message,
|
|
|
|
private_message_report,
|
2023-07-14 15:17:06 +00:00
|
|
|
received_activity,
|
2023-04-17 19:19:51 +00:00
|
|
|
registration_application,
|
|
|
|
secret,
|
2023-07-14 15:17:06 +00:00
|
|
|
sent_activity,
|
2023-04-17 19:19:51 +00:00
|
|
|
site,
|
|
|
|
site_aggregates,
|
|
|
|
site_language,
|
|
|
|
tagline,
|
2019-02-28 06:02:55 +00:00
|
|
|
);
|