v6/migrations/20220530211821_initial_sche...

29 lines
768 B
SQL

create table if not exists articles (
id text primary key not null,
conversation text not null,
has_federated boolean not null,
article_object text not null
);
create table if not exists actors (
id text primary key not null,
actor_object text not null,
is_follower boolean not null default 0,
display_name text,
inbox text not null,
shared_inbox text,
icon_url text,
public_key_pem text
);
create table if not exists notes (
id text primary key not null,
content text not null,
in_reply_to text not null,
conversation text not null,
published text not null, -- RFC 3339 formatted date (e.g., 1985-04-12T23:20:50.52Z)
actor_id text not null,
digested boolean not null default 0,
foreign key (actor_id) references actors (id) on delete cascade
);