This commit is contained in:
2025-02-20 12:45:52 +03:00
parent cb4300c801
commit eb272e218d
3 changed files with 2 additions and 47 deletions
-38
View File
@@ -7,46 +7,8 @@ from psycopg2 import pool
import json
allow_update = True
load_dotenv()
"""
{
"1025872648": {
"username": "ahunuin",
"first_name": "Arseniy",
"last_name": "",
"group": "205",
"timeout": "10",
"allow_message": "yes",
"thread": "General"
},
"856850518": {
"username": "kr0sh_512",
"first_name": "Дмитрий",
"last_name": "",
"group": "202",
"timeout": "10",
"allow_message": "no",
"thread": "General"
}
}
"""
"""
CREATE TABLE IF NOT EXISTS users (
id BIGINT PRIMARY KEY,
username VARCHAR(255),
first_name VARCHAR(255),
last_name VARCHAR(255),
"group" VARCHAR(255) DEFAULT 'other',
timeout INT DEFAULT 10,
allow_message BOOLEAN DEFAULT TRUE,
thread VARCHAR(255) DEFAULT 'General',
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
"""
if os.environ.get("ENV") == "dev":
print("DEV: Connecting to local database")