irclogger_web/database_settings.sql

23 lines
611 B
MySQL
Raw Normal View History

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,
public 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,
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,
port int not null
);
create table accessors(id int primary key not null,
channel_id int not null, -- foreign key in channels table
user_id int not null -- foreign key in users table
);