You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lemmy/migrations/2020-07-18-234519_add_uniqu.../down.sql

21 lines
635 B
SQL

alter table community alter column actor_id set not null;
alter table community alter column actor_id set default 'http://fake.com';
alter table user_ alter column actor_id set not null;
alter table user_ alter column actor_id set default 'http://fake.com';
drop function generate_unique_changeme;
update community
set actor_id = 'http://fake.com'
where actor_id like 'changeme_%';
update user_
set actor_id = 'http://fake.com'
where actor_id like 'changeme_%';
drop index idx_user_lower_actor_id;
create unique index idx_user_name_lower_actor_id on user_ (lower(name), lower(actor_id));
drop index idx_community_lower_actor_id;