diff options
author | Dessalines <tyhou13@gmx.com> | 2020-06-26 21:12:41 -0400 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2020-06-26 21:12:41 -0400 |
commit | 86dc50f9f0f6ea98273eb3845d5486d2fad8c1ff (patch) | |
tree | 7925b5768db7fd7c53115d99a40d6bdf638c27ef /server/migrations | |
parent | 7d1c6e9a402c14833b94cd33f7f170ffcbc820ed (diff) |
Some fixes to federation.
- Advanced code migrations now disable then re-enable triggers.
Brings run time down to < 15 seconds, no need to thread them.
- Changing ap_ids and actor_ids in migrations to a fake url,
so it doesn't break XsdAnyUri in activitystreams.
Diffstat (limited to 'server/migrations')
4 files changed, 6 insertions, 6 deletions
diff --git a/server/migrations/2020-03-26-192410_add_activitypub_tables/up.sql b/server/migrations/2020-03-26-192410_add_activitypub_tables/up.sql index 8fe3b8ed..06db580e 100644 --- a/server/migrations/2020-03-26-192410_add_activitypub_tables/up.sql +++ b/server/migrations/2020-03-26-192410_add_activitypub_tables/up.sql @@ -15,7 +15,7 @@ create unique index idx_activity_unique_apid on activity ((data ->> 'id'::text)) -- Add federation columns to the two actor tables alter table user_ -- TODO uniqueness constraints should be added on these 3 columns later -add column actor_id character varying(255) not null default 'changeme', -- This needs to be checked and updated in code, building from the site url if local +add column actor_id character varying(255) not null default 'http://fake.com', -- This needs to be checked and updated in code, building from the site url if local add column bio text, -- not on community, already has description add column local boolean not null default true, add column private_key text, -- These need to be generated from code @@ -25,7 +25,7 @@ add column last_refreshed_at timestamp not null default now() -- Used to re-fetc -- Community alter table community -add column actor_id character varying(255) not null default 'changeme', -- This needs to be checked and updated in code, building from the site url if local +add column actor_id character varying(255) not null default 'http://fake.com', -- This needs to be checked and updated in code, building from the site url if local add column local boolean not null default true, add column private_key text, -- These need to be generated from code add column public_key text, diff --git a/server/migrations/2020-04-03-194936_add_activitypub_for_posts_and_comments/up.sql b/server/migrations/2020-04-03-194936_add_activitypub_for_posts_and_comments/up.sql index a3fb9562..6c930cd8 100644 --- a/server/migrations/2020-04-03-194936_add_activitypub_for_posts_and_comments/up.sql +++ b/server/migrations/2020-04-03-194936_add_activitypub_for_posts_and_comments/up.sql @@ -2,13 +2,13 @@ alter table post -- TODO uniqueness constraints should be added on these 3 columns later -add column ap_id character varying(255) not null default 'changeme', -- This needs to be checked and updated in code, building from the site url if local +add column ap_id character varying(255) not null default 'http://fake.com', -- This needs to be checked and updated in code, building from the site url if local add column local boolean not null default true ; alter table comment -- TODO uniqueness constraints should be added on these 3 columns later -add column ap_id character varying(255) not null default 'changeme', -- This needs to be checked and updated in code, building from the site url if local +add column ap_id character varying(255) not null default 'http://fake.com', -- This needs to be checked and updated in code, building from the site url if local add column local boolean not null default true ; diff --git a/server/migrations/2020-04-07-135912_add_user_community_apub_constraints/down.sql b/server/migrations/2020-04-07-135912_add_user_community_apub_constraints/down.sql index faf24fdc..46fc953a 100644 --- a/server/migrations/2020-04-07-135912_add_user_community_apub_constraints/down.sql +++ b/server/migrations/2020-04-07-135912_add_user_community_apub_constraints/down.sql @@ -2,7 +2,7 @@ drop view user_view cascade; alter table user_ -add column fedi_name varchar(40) not null default 'changeme'; +add column fedi_name varchar(40) not null default 'http://fake.com'; alter table user_ add constraint user__name_fedi_name_key unique (name, fedi_name); diff --git a/server/migrations/2020-05-05-210233_add_activitypub_for_private_messages/up.sql b/server/migrations/2020-05-05-210233_add_activitypub_for_private_messages/up.sql index 627be1f3..9f152ada 100644 --- a/server/migrations/2020-05-05-210233_add_activitypub_for_private_messages/up.sql +++ b/server/migrations/2020-05-05-210233_add_activitypub_for_private_messages/up.sql @@ -1,5 +1,5 @@ alter table private_message -add column ap_id character varying(255) not null default 'changeme', -- This needs to be checked and updated in code, building from the site url if local +add column ap_id character varying(255) not null default 'http://fake.com', -- This needs to be checked and updated in code, building from the site url if local add column local boolean not null default true ; |