mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-05 12:05:01 +00:00
ba5c93c8da
- 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
23 lines
840 B
SQL
23 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);
|