aboutsummaryrefslogtreecommitdiffstats
path: root/migrations/20260210193544_profile.sql
blob: f47d03409a61c1969205f168210a218267db99ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
create type actor_kind as enum (
  'application',
  'group',
  'organization',
  'person',
  'service'
);

create table profile (
  ap_id text primary key,
  username varchar(15),
  description varchar(255),
  inbox text not null,
  role actor_kind not null default 'person',
  outbox text,
  picture text,
  public_key text not null,
  private_key text,
  created_at timestamptz not null default now(),
  last_refreshed_at timestamptz not null default now()
);

create index user_inbox_idx on profile (inbox);
create index user_outbox_idx on profile (outbox);
create index user_role_idx on profile (role);
create index user_username_idx on profile (username);