X-Git-Url: http://these/git/?a=blobdiff_plain;f=crates%2Fdb_schema%2Fsrc%2Fschema.rs;h=5aa54c9db4090a0d3fe56f0938832e080eb8c1bd;hb=HEAD;hp=f2ccf5e2ac07ddfec913d4f3e6e6866480460ef3;hpb=d8722b6e91a79878001d968150687d25c5d6905e;p=lemmy.git diff --git a/crates/db_schema/src/schema.rs b/crates/db_schema/src/schema.rs index f2ccf5e2..5aa54c9d 100644 --- a/crates/db_schema/src/schema.rs +++ b/crates/db_schema/src/schema.rs @@ -1,29 +1,17 @@ // @generated automatically by Diesel CLI. pub mod sql_types { - #[derive(diesel::sql_types::SqlType)] - #[diesel(postgres_type(name = "listing_type_enum"))] - pub struct ListingTypeEnum; + #[derive(diesel::sql_types::SqlType)] + #[diesel(postgres_type(name = "listing_type_enum"))] + pub struct ListingTypeEnum; - #[derive(diesel::sql_types::SqlType)] - #[diesel(postgres_type(name = "registration_mode_enum"))] - pub struct RegistrationModeEnum; + #[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! { - activity (id) { - id -> Int4, - data -> Jsonb, - local -> Bool, - published -> Timestamp, - updated -> Nullable, - ap_id -> Text, - sensitive -> Bool, - } + #[derive(diesel::sql_types::SqlType)] + #[diesel(postgres_type(name = "sort_type_enum"))] + pub struct SortTypeEnum; } diesel::table! { @@ -64,6 +52,15 @@ diesel::table! { } } +diesel::table! { + captcha_answer (id) { + id -> Int4, + uuid -> Uuid, + answer -> Text, + published -> Timestamp, + } +} + diesel::table! { use diesel::sql_types::*; use diesel_ltree::sql_types::Ltree; @@ -77,6 +74,7 @@ diesel::table! { published -> Timestamp, updated -> Nullable, deleted -> Bool, + #[max_length = 255] ap_id -> Varchar, local -> Bool, path -> Ltree, @@ -94,6 +92,8 @@ diesel::table! { downvotes -> Int8, published -> Timestamp, child_count -> Int4, + hot_rank -> Int4, + controversy_rank -> Float8, } } @@ -144,7 +144,9 @@ diesel::table! { diesel::table! { community (id) { id -> Int4, + #[max_length = 255] name -> Varchar, + #[max_length = 255] title -> Varchar, description -> Nullable, removed -> Bool, @@ -152,6 +154,7 @@ diesel::table! { updated -> Nullable, deleted -> Bool, nsfw -> Bool, + #[max_length = 255] actor_id -> Varchar, local -> Bool, private_key -> Nullable, @@ -159,13 +162,18 @@ diesel::table! { last_refreshed_at -> Timestamp, icon -> Nullable, banner -> Nullable, + #[max_length = 255] followers_url -> Varchar, + #[max_length = 255] inbox_url -> Varchar, + #[max_length = 255] shared_inbox_url -> Nullable, hidden -> Bool, posting_restricted_to_mods -> Bool, instance_id -> Int4, + #[max_length = 255] moderators_url -> Nullable, + #[max_length = 255] featured_url -> Nullable, } } @@ -182,6 +190,7 @@ diesel::table! { users_active_week -> Int8, users_active_month -> Int8, users_active_half_year -> Int8, + hot_rank -> Int4, } } @@ -235,6 +244,7 @@ diesel::table! { custom_emoji (id) { id -> Int4, local_site_id -> Int4, + #[max_length = 128] shortcode -> Varchar, image_url -> Text, alt_text -> Text, @@ -248,6 +258,7 @@ diesel::table! { custom_emoji_keyword (id) { id -> Int4, custom_emoji_id -> Int4, + #[max_length = 128] keyword -> Varchar, } } @@ -283,10 +294,13 @@ diesel::table! { diesel::table! { instance (id) { id -> Int4, + #[max_length = 255] domain -> Varchar, published -> Timestamp, updated -> Nullable, + #[max_length = 255] software -> Nullable, + #[max_length = 255] version -> Nullable, } } @@ -294,6 +308,7 @@ diesel::table! { diesel::table! { language (id) { id -> Int4, + #[max_length = 3] code -> Varchar, name -> Text, } @@ -309,6 +324,7 @@ diesel::table! { site_id -> Int4, site_setup -> Bool, enable_downvotes -> Bool, + enable_federated_downvotes -> Bool, enable_nsfw -> Bool, community_creation_admin_only -> Bool, require_email_verification -> Bool, @@ -322,9 +338,8 @@ diesel::table! { slur_filter_regex -> Nullable, actor_name_max_length -> Int4, federation_enabled -> Bool, - federation_debug -> Bool, - federation_worker_count -> Int4, captcha_enabled -> Bool, + #[max_length = 255] captcha_difficulty -> Varchar, published -> Timestamp, updated -> Nullable, @@ -365,9 +380,10 @@ diesel::table! { password_encrypted -> Text, email -> Nullable, show_nsfw -> Bool, - theme -> Varchar, + theme -> Text, default_sort_type -> SortTypeEnum, default_listing_type -> ListingTypeEnum, + #[max_length = 20] interface_language -> Varchar, show_avatars -> Bool, send_notifications_to_email -> Bool, @@ -380,6 +396,10 @@ diesel::table! { accepted_application -> Bool, totp_2fa_secret -> Nullable, totp_2fa_url -> Nullable, + open_links_in_new_tab -> Bool, + blur_nsfw -> Bool, + auto_expand -> Bool, + infinite_scroll_enabled -> Bool, } } @@ -516,7 +536,7 @@ diesel::table! { diesel::table! { password_reset_request (id) { id -> Int4, - token_encrypted -> Text, + token -> Text, published -> Timestamp, local_user_id -> Int4, } @@ -525,12 +545,15 @@ diesel::table! { diesel::table! { person (id) { id -> Int4, + #[max_length = 255] name -> Varchar, + #[max_length = 255] display_name -> Nullable, avatar -> Nullable, banned -> Bool, published -> Timestamp, updated -> Nullable, + #[max_length = 255] actor_id -> Varchar, bio -> Nullable, local -> Bool, @@ -539,7 +562,9 @@ diesel::table! { last_refreshed_at -> Timestamp, banner -> Nullable, deleted -> Bool, + #[max_length = 255] inbox_url -> Varchar, + #[max_length = 255] shared_inbox_url -> Nullable, matrix_user_id -> Nullable, admin -> Bool, @@ -610,8 +635,10 @@ diesel::table! { diesel::table! { post (id) { id -> Int4, + #[max_length = 200] name -> Varchar, - url -> Nullable, + #[max_length = 512] + url -> Nullable, body -> Nullable, creator_id -> Int4, community_id -> Int4, @@ -624,6 +651,7 @@ diesel::table! { embed_title -> Nullable, embed_description -> Nullable, thumbnail_url -> Nullable, + #[max_length = 255] ap_id -> Varchar, local -> Bool, embed_video_url -> Nullable, @@ -646,6 +674,11 @@ diesel::table! { newest_comment_time -> Timestamp, featured_community -> Bool, featured_local -> Bool, + hot_rank -> Int4, + hot_rank_active -> Int4, + community_id -> Int4, + creator_id -> Int4, + controversy_rank -> Float8, } } @@ -673,6 +706,7 @@ diesel::table! { id -> Int4, creator_id -> Int4, post_id -> Int4, + #[max_length = 200] original_post_name -> Varchar, original_post_url -> Nullable, original_post_body -> Nullable, @@ -703,6 +737,7 @@ diesel::table! { read -> Bool, published -> Timestamp, updated -> Nullable, + #[max_length = 255] ap_id -> Varchar, local -> Bool, } @@ -722,6 +757,14 @@ diesel::table! { } } +diesel::table! { + received_activity (id) { + id -> Int8, + ap_id -> Text, + published -> Timestamp, + } +} + diesel::table! { registration_application (id) { id -> Int4, @@ -740,18 +783,32 @@ diesel::table! { } } +diesel::table! { + sent_activity (id) { + id -> Int8, + ap_id -> Text, + data -> Json, + sensitive -> Bool, + published -> Timestamp, + } +} + diesel::table! { site (id) { id -> Int4, + #[max_length = 20] name -> Varchar, sidebar -> Nullable, published -> Timestamp, updated -> Nullable, icon -> Nullable, banner -> Nullable, + #[max_length = 150] description -> Nullable, + #[max_length = 255] actor_id -> Varchar, last_refreshed_at -> Timestamp, + #[max_length = 255] inbox_url -> Varchar, private_key -> Nullable, public_key -> Text, @@ -858,6 +915,8 @@ 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)); +diesel::joinable!(post_aggregates -> community (community_id)); +diesel::joinable!(post_aggregates -> person (creator_id)); diesel::joinable!(post_aggregates -> post (post_id)); diesel::joinable!(post_like -> person (person_id)); diesel::joinable!(post_like -> post (post_id)); @@ -876,66 +935,68 @@ diesel::joinable!(site_language -> site (site_id)); diesel::joinable!(tagline -> local_site (local_site_id)); diesel::allow_tables_to_appear_in_same_query!( - activity, - admin_purge_comment, - admin_purge_community, - admin_purge_person, - admin_purge_post, - 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, - instance, - language, - local_site, - local_site_rate_limit, - local_user, - local_user_language, - 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, - registration_application, - secret, - site, - site_aggregates, - site_language, - tagline, + admin_purge_comment, + admin_purge_community, + admin_purge_person, + admin_purge_post, + captcha_answer, + 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, + instance, + language, + local_site, + local_site_rate_limit, + local_user, + local_user_language, + 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, + received_activity, + registration_application, + secret, + sent_activity, + site, + site_aggregates, + site_language, + tagline, );