Skip to content

Commit

Permalink
database/raw_queries: Fixed ban/unban (closes #3)
Browse files Browse the repository at this point in the history
  • Loading branch information
alsoGAMER committed Feb 13, 2021
1 parent 69d0136 commit f338ab3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions BotBase/database/raw_queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
tg_id INTEGER(20) PRIMARY KEY NOT NULL,
tg_uname VARCHAR(32) UNIQUE NULL DEFAULT 'null',
date TEXT NOT NULL,
banned INTEGER NOT NULL DEFAULT 0);
banned TINYINT(1) NOT NULL DEFAULT 0);
"""
# endregion


DB_GET_USERS = "SELECT users.tg_id FROM users"
DB_GET_USER = "SELECT * FROM users WHERE users.tg_id = %s"
DB_SET_USER = "INSERT INTO users (tg_id, tg_uname, date, banned) VALUES (%s, %s, %s, %s)"
DB_BAN_USER = "UPDATE users SET users.banned = FALSE WHERE users.tg_id = %s"
DB_BAN_USER = "UPDATE users SET users.banned = TRUE WHERE users.tg_id = %s"
DB_UNBAN_USER = "UPDATE users SET users.banned = FALSE WHERE users.tg_id = %s"
DB_CHECK_BANNED = "SELECT users.banned FROM users WHERE users.tg_id = %s"
DB_UPDATE_NAME = "UPDATE users SET users.tg_uname = %s WHERE users.tg_id = %s"
Expand Down

0 comments on commit f338ab3

Please sign in to comment.