2021-03-20 19:21:51 +00:00
|
|
|
alter table person add column matrix_user_id text;
|
2021-03-22 14:28:00 +00:00
|
|
|
alter table person add column admin boolean default false not null;
|
2021-03-20 19:21:51 +00:00
|
|
|
|
|
|
|
update person p
|
2021-03-22 14:28:00 +00:00
|
|
|
set
|
|
|
|
matrix_user_id = lu.matrix_user_id,
|
|
|
|
admin = lu.admin
|
2021-03-20 19:21:51 +00:00
|
|
|
from local_user lu
|
|
|
|
where p.id = lu.person_id;
|
|
|
|
|
|
|
|
alter table local_user drop column matrix_user_id;
|
2021-03-22 14:28:00 +00:00
|
|
|
alter table local_user drop column admin;
|
2021-03-20 20:32:52 +00:00
|
|
|
|
|
|
|
-- Regenerate the person_alias views
|
|
|
|
drop view person_alias_1, person_alias_2;
|
|
|
|
create view person_alias_1 as select * from person;
|
|
|
|
create view person_alias_2 as select * from person;
|