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