Add Ormin ORM support for BaraDB (Nim client)
CI / test (push) Has been cancelled
CI / verify (push) Has been cancelled
Clients CI / build-server (push) Has been cancelled
Clients CI / test-python (push) Has been cancelled
Clients CI / test-javascript (push) Has been cancelled
Clients CI / test-nim (push) Has been cancelled
Clients CI / test-rust (push) Has been cancelled
CI / test (push) Has been cancelled
CI / verify (push) Has been cancelled
Clients CI / build-server (push) Has been cancelled
Clients CI / test-python (push) Has been cancelled
Clients CI / test-javascript (push) Has been cancelled
Clients CI / test-nim (push) Has been cancelled
Clients CI / test-rust (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
pragma foreign_keys = on;
|
||||
|
||||
create table if not exists thread(
|
||||
id integer primary key,
|
||||
name varchar(100) not null,
|
||||
views integer not null,
|
||||
modified timestamp not null default (DATETIME('now'))
|
||||
);
|
||||
|
||||
create unique index if not exists ThreadNameIx on thread (name);
|
||||
|
||||
create table if not exists person(
|
||||
id integer primary key,
|
||||
name varchar(20) not null,
|
||||
password varchar(32) not null,
|
||||
email varchar(30) not null,
|
||||
creation timestamp not null default (DATETIME('now')),
|
||||
salt varchar(128) not null,
|
||||
status varchar(30) not null,
|
||||
lastOnline timestamp not null default (DATETIME('now')),
|
||||
ban varchar(128) not null default ''
|
||||
);
|
||||
|
||||
create unique index if not exists UserNameIx on person (name);
|
||||
|
||||
create table if not exists post(
|
||||
id integer primary key,
|
||||
author integer not null,
|
||||
ip varchar(20) not null,
|
||||
header varchar(100) not null,
|
||||
content varchar(1000) not null,
|
||||
thread integer not null,
|
||||
creation timestamp not null default (DATETIME('now')),
|
||||
|
||||
foreign key (thread) references thread(id),
|
||||
foreign key (author) references person(id)
|
||||
);
|
||||
|
||||
create table if not exists session(
|
||||
id integer primary key,
|
||||
ip varchar(20) not null,
|
||||
password varchar(32) not null,
|
||||
userid integer not null,
|
||||
lastModified timestamp not null default (DATETIME('now')),
|
||||
foreign key (userid) references person(id)
|
||||
);
|
||||
|
||||
create table if not exists antibot(
|
||||
id integer primary key,
|
||||
ip varchar(20) not null,
|
||||
answer varchar(30) not null,
|
||||
created timestamp not null default (DATETIME('now'))
|
||||
);
|
||||
|
||||
create table if not exists error(
|
||||
uuid varchar(36) primary key,
|
||||
message varchar(1000) not null,
|
||||
created timestamp not null default (DATETIME('now'))
|
||||
);
|
||||
|
||||
create index PersonStatusIdx on person(status);
|
||||
create index PostByAuthorIdx on post(thread, author);
|
||||
Reference in New Issue
Block a user