mirror of
https://github.com/LemmyNet/lemmy
synced 2024-10-28 15:46:38 +00:00
c786464381
- Adding main forum page. Fixes #11 - Adding view version for posts. #21 - Got rid of fedi user ids. Fixes #22 - Post sorting working. Fixes #24
24 lines
840 B
SQL
24 lines
840 B
SQL
create table community (
|
|
id serial primary key,
|
|
name varchar(20) not null unique,
|
|
creator_id int references user_ on update cascade on delete cascade not null,
|
|
published timestamp not null default now(),
|
|
updated timestamp
|
|
);
|
|
|
|
create table community_moderator (
|
|
id serial primary key,
|
|
community_id int references community on update cascade on delete cascade not null,
|
|
user_id int references user_ on update cascade on delete cascade not null,
|
|
published timestamp not null default now()
|
|
);
|
|
|
|
create table community_follower (
|
|
id serial primary key,
|
|
community_id int references community on update cascade on delete cascade not null,
|
|
user_id int references user_ on update cascade on delete cascade not null,
|
|
published timestamp not null default now()
|
|
);
|
|
|
|
insert into community (name, creator_id) values ('main', 1);
|