noo/server/sql/database.sql

18 lines
922 B
MySQL
Raw Permalink Normal View History

2021-04-03 22:15:09 +03:00
CREATE DATABASE IF NOT EXISTS litt CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE TABLE diffs ( client_id int not null,
device_id varchar(255) not null,
created timestamp not null,
2021-04-17 22:04:47 +03:00
content blob not null,
diff_id int not null primary key );
2021-04-03 22:15:09 +03:00
2021-04-17 22:04:47 +03:00
create table clients ( client_id int not null primary key,
2021-04-03 22:15:09 +03:00
username varchar(255) not null,
2021-04-17 22:04:47 +03:00
pwdhash varchar(255) not null);
2021-04-03 22:15:09 +03:00
create table devices ( client_id int not null,
device_id int not null,
device_name varchar(255) not null,
2021-04-17 22:04:47 +03:00
device_platform int not null,
primary key (client_id, device_id));