]> Untitled Git - lemmy.git/blob - server/migrations/2020-08-25-132005_add_unique_ap_ids/down.sql
routes.api: fix get_captcha endpoint (#1135)
[lemmy.git] / server / migrations / 2020-08-25-132005_add_unique_ap_ids / down.sql
1 -- Drop the uniques
2 alter table private_message drop constraint idx_private_message_ap_id;
3 alter table post drop constraint idx_post_ap_id;
4 alter table comment drop constraint idx_comment_ap_id;
5 alter table user_ drop constraint idx_user_actor_id;
6 alter table community drop constraint idx_community_actor_id;
7
8 alter table private_message alter column ap_id set not null;
9 alter table private_message alter column ap_id set default 'http://fake.com';
10
11 alter table post alter column ap_id set not null;
12 alter table post alter column ap_id set default 'http://fake.com';
13
14 alter table comment alter column ap_id set not null;
15 alter table comment alter column ap_id set default 'http://fake.com';
16
17 update private_message
18 set ap_id = 'http://fake.com'
19 where ap_id like 'changeme_%';
20
21 update post
22 set ap_id = 'http://fake.com'
23 where ap_id like 'changeme_%';
24
25 update comment
26 set ap_id = 'http://fake.com'
27 where ap_id like 'changeme_%';