mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-09-09 16:08:49 -06:00
fixes
This commit is contained in:
parent
4506309d83
commit
552120498b
3
Cargo.lock
generated
3
Cargo.lock
generated
@ -11,8 +11,7 @@ checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3"
|
||||
[[package]]
|
||||
name = "activitypub_federation"
|
||||
version = "0.4.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4e6e7fefba6602240fcf612931b70640ad1e249dff833551ebc218f1c96a4193"
|
||||
source = "git+https://github.com/phiresky/activitypub-federation-rust/?branch=raw-sending#7991eab37536067d312d75d4fbf2a769286d4dbe"
|
||||
dependencies = [
|
||||
"activitystreams-kinds",
|
||||
"actix-web",
|
||||
|
@ -297,7 +297,7 @@ diesel::table! {
|
||||
diesel::table! {
|
||||
federation_queue_state (domain) {
|
||||
domain -> Text,
|
||||
last_successful_id -> Int4,
|
||||
last_successful_id -> Int8,
|
||||
fail_count -> Int4,
|
||||
last_retry -> Timestamptz,
|
||||
}
|
||||
@ -792,12 +792,18 @@ diesel::table! {
|
||||
}
|
||||
|
||||
diesel::table! {
|
||||
use diesel::sql_types::*;
|
||||
use super::sql_types::ActorTypeEnum;
|
||||
|
||||
sent_activity (id) {
|
||||
id -> Int8,
|
||||
ap_id -> Text,
|
||||
data -> Json,
|
||||
sensitive -> Bool,
|
||||
published -> Timestamp,
|
||||
send_targets -> Jsonb,
|
||||
actor_type -> ActorTypeEnum,
|
||||
actor_apub_id -> Text,
|
||||
}
|
||||
}
|
||||
|
||||
@ -892,7 +898,6 @@ 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));
|
||||
diesel::joinable!(federation_queue_state -> activity (last_successful_id));
|
||||
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));
|
||||
|
@ -1,21 +0,0 @@
|
||||
CREATE TYPE actor_type_enum AS enum(
|
||||
'site',
|
||||
'community',
|
||||
'person'
|
||||
);
|
||||
|
||||
ALTER TABLE activity
|
||||
ADD COLUMN send_targets jsonb DEFAULT NULL,
|
||||
ADD COLUMN actor_type actor_type_enum DEFAULT NULL,
|
||||
ADD COLUMN actor_apub_id text DEFAULT NULL;
|
||||
|
||||
CREATE TABLE federation_queue_state(
|
||||
domain text PRIMARY KEY,
|
||||
last_successful_id integer NOT NULL,
|
||||
fail_count integer NOT NULL,
|
||||
last_retry timestamptz NOT NULL
|
||||
);
|
||||
|
||||
-- for incremental fetches of followers
|
||||
CREATE INDEX idx_community_follower_published ON community_follower(published);
|
||||
|
@ -1,4 +1,4 @@
|
||||
ALTER TABLE activity
|
||||
ALTER TABLE sent_activity
|
||||
DROP COLUMN send_targets,
|
||||
DROP COLUMN actor_apub_id,
|
||||
DROP COLUMN actor_type;
|
@ -0,0 +1,26 @@
|
||||
CREATE TYPE actor_type_enum AS enum(
|
||||
'site',
|
||||
'community',
|
||||
'person'
|
||||
);
|
||||
|
||||
ALTER TABLE sent_activity
|
||||
ADD COLUMN send_targets jsonb NOT NULL DEFAULT '{"inboxes": [], "community_followers_of": [], "all_instances": false}',
|
||||
ADD COLUMN actor_type actor_type_enum NOT NULL DEFAULT 'person',
|
||||
ADD COLUMN actor_apub_id text NOT NULL DEFAULT '';
|
||||
|
||||
ALTER TABLE sent_activity
|
||||
ALTER COLUMN send_targets DROP DEFAULT,
|
||||
ALTER COLUMN actor_type DROP DEFAULT,
|
||||
ALTER COLUMN actor_apub_id DROP DEFAULT;
|
||||
|
||||
CREATE TABLE federation_queue_state(
|
||||
domain text PRIMARY KEY,
|
||||
last_successful_id bigint NOT NULL,
|
||||
fail_count integer NOT NULL,
|
||||
last_retry timestamptz NOT NULL
|
||||
);
|
||||
|
||||
-- for incremental fetches of followers
|
||||
CREATE INDEX idx_community_follower_published ON community_follower(published);
|
||||
|
Loading…
Reference in New Issue
Block a user