Update scheme

This commit is contained in:
AB
2020-12-07 15:58:58 +03:00
parent eb473aeddc
commit ead90436ea

View File

@ -343,6 +343,11 @@ pub(crate) async fn add_sentence(message: &telegram_bot::Message) -> Result<(),
// SCHEME
static SCHEME: &str = "
--
-- File generated with SQLiteStudio v3.2.1 on Mon Dec 7 15:57:23 2020
--
-- Text encoding used: System
--
PRAGMA foreign_keys = off;
BEGIN TRANSACTION;
@ -355,6 +360,7 @@ CREATE TABLE IF NOT EXISTS alert (
message TEXT
);
-- Table: conf
CREATE TABLE IF NOT EXISTS conf (
id NUMERIC NOT NULL
@ -366,6 +372,7 @@ CREATE TABLE IF NOT EXISTS conf (
)
);
-- Table: file
CREATE TABLE IF NOT EXISTS file (
path TEXT NOT NULL,
@ -374,6 +381,15 @@ CREATE TABLE IF NOT EXISTS file (
file_id STRING PRIMARY KEY
);
-- Table: messages
CREATE TABLE IF NOT EXISTS messages (
id INTEGER NOT NULL
PRIMARY KEY AUTOINCREMENT,
text TEXT UNIQUE
);
-- Table: relations
CREATE TABLE IF NOT EXISTS relations (
id INTEGER NOT NULL
@ -397,6 +413,7 @@ CREATE TABLE IF NOT EXISTS relations (
REFERENCES conf (id)
);
-- Table: reset
CREATE TABLE IF NOT EXISTS reset (
id INTEGER PRIMARY KEY AUTOINCREMENT,
@ -410,6 +427,13 @@ CREATE TABLE IF NOT EXISTS reset (
REFERENCES user (id)
);
-- Table: stop_words
CREATE TABLE IF NOT EXISTS stop_words (
word TEXT
);
-- Table: user
CREATE TABLE IF NOT EXISTS user (
id INTEGER NOT NULL
@ -424,19 +448,15 @@ CREATE TABLE IF NOT EXISTS user (
ON CONFLICT REPLACE
);
-- Table: word
CREATE TABLE IF NOT EXISTS word (
id INTEGER PRIMARY KEY AUTOINCREMENT,
word TEXT UNIQUE
);
-- Table: xxx_message
CREATE TABLE IF NOT EXISTS xxx_message (
id INTEGER NOT NULL
PRIMARY KEY AUTOINCREMENT,
text TEXT UNIQUE
);
COMMIT TRANSACTION;
PRAGMA foreign_keys = on;
";