]> Untitled Git - lemmy.git/blob - server/migrations/2020-07-18-234519_add_unique_community_user_actor_ids/down.sql
7a4f2e2f1e95c7c48015c5706405da5a06bae366
[lemmy.git] / server / migrations / 2020-07-18-234519_add_unique_community_user_actor_ids / down.sql
1
2 alter table community alter column actor_id set not null;
3 alter table community alter column actor_id set default 'http://fake.com';
4 alter table user_ alter column actor_id set not null;
5 alter table user_ alter column actor_id set default 'http://fake.com';
6
7 drop function generate_unique_changeme;
8
9 update community
10 set actor_id = 'http://fake.com'
11 where actor_id like 'changeme_%';
12
13 update user_
14 set actor_id = 'http://fake.com'
15 where actor_id like 'changeme_%';
16
17 drop index idx_user_lower_actor_id;
18 create unique index idx_user_name_lower_actor_id on user_ (lower(name), lower(actor_id));
19
20 drop index idx_community_lower_actor_id;