2023-03-16 11:43:25 +01:00
|
|
|
-- 2023-03-16: Add fediverse (Mastodon/Pleroma/Misskey) OAuth
|
|
|
|
|
2023-08-16 03:30:34 +02:00
|
|
|
-- +migrate Up
|
|
|
|
|
2023-03-16 11:43:25 +01:00
|
|
|
create table fediverse_apps (
|
|
|
|
id serial primary key,
|
|
|
|
instance text not null unique,
|
|
|
|
client_id text not null,
|
|
|
|
client_secret text not null,
|
|
|
|
instance_type text not null
|
|
|
|
);
|
|
|
|
|
|
|
|
alter table users add column fediverse text null;
|
|
|
|
alter table users add column fediverse_username text null;
|
|
|
|
alter table users add column fediverse_app_id integer null references fediverse_apps (id) on delete set null;
|
2023-08-16 03:30:34 +02:00
|
|
|
|
|
|
|
-- +migrate Down
|
|
|
|
|
|
|
|
alter table users drop column fediverse;
|
|
|
|
alter table users drop column fediverse_username;
|
|
|
|
alter table users drop column fediverse_app_id;
|
|
|
|
|
|
|
|
drop table fediverse_apps;
|