This commit is contained in:
2026-02-27 15:36:00 +03:00
parent ffe185c9ff
commit b394c0be68
12 changed files with 150 additions and 26 deletions

View File

@@ -0,0 +1,15 @@
CREATE TABLE h2_hosts(
id SERIAL PRIMARY KEY,
name TEXT NOT NULL,
url TEXT NOT NULL
);
CREATE UNIQUE INDEX h2_hosts_uindex ON h2_hosts(id);
CREATE TABLE h2_users (
id SERIAL PRIMARY KEY,
tg_id INT8 REFERENCES users(id),
username TEXT NOT NULL,
password TEXT NOT NULL
);
CREATE UNIQUE INDEX h2_users_uindex ON h2_users(id);
CREATE INDEX h2_users_index ON h2_users(tg_id, username);