2023-09-05 10:04:47 +02:00
|
|
|
create table channels(id int primary key not null,
|
|
|
|
server_id int not null, -- foreign key in servers table
|
|
|
|
name text not null,
|
2023-09-21 20:07:25 +02:00
|
|
|
public int not null,
|
|
|
|
enabled int not null
|
2023-09-05 10:04:47 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
create table users(id int primary key not null,
|
|
|
|
name text not null,
|
|
|
|
password text not null,
|
2023-09-11 10:08:12 +02:00
|
|
|
privileges int not null -- 0 - normal user, 1 - moderator, 2 - administrator
|
2023-09-05 10:04:47 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
create table servers(id int primary key not null,
|
|
|
|
name text not null,
|
|
|
|
host text not null,
|
2023-09-21 20:07:25 +02:00
|
|
|
port int not null,
|
|
|
|
enabled int not null
|
2023-09-05 10:04:47 +02:00
|
|
|
);
|
|
|
|
|
2023-09-16 17:06:10 +02:00
|
|
|
create table accessors(user_id int not null, -- foreign key in users table
|
|
|
|
channel_id int not null -- foreign key in channels table
|
2023-09-05 10:04:47 +02:00
|
|
|
);
|