From 200ca7067d853c3b5d7e055b37c0b5b74ac46c3c Mon Sep 17 00:00:00 2001 From: Nick80835 Date: Wed, 24 Mar 2021 09:10:32 -0400 Subject: [PATCH] use BigIntegerField instead of FloatField and IntegerField --- ubot/database.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ubot/database.py b/ubot/database.py index fe8ace3..d786fc5 100644 --- a/ubot/database.py +++ b/ubot/database.py @@ -1,6 +1,6 @@ import ujson -from peewee import (BooleanField, FloatField, IntegerField, Model, - SqliteDatabase, TextField) +from peewee import (BigIntegerField, BooleanField, Model, SqliteDatabase, + TextField) DATABASE = SqliteDatabase("database.sqlite") @@ -11,15 +11,15 @@ class BaseDB(Model): class BlacklistedUser(BaseDB): - user_id = IntegerField(unique=True, primary_key=True) + user_id = BigIntegerField(unique=True, primary_key=True) class SudoUser(BaseDB): - user_id = IntegerField(unique=True, primary_key=True) + user_id = BigIntegerField(unique=True, primary_key=True) class Chat(BaseDB): - chat_id = FloatField(unique=True, primary_key=True) + chat_id = BigIntegerField(unique=True, primary_key=True) fun_enabled = BooleanField(default=True) nsfw_enabled = BooleanField(default=True) disabled_commands = TextField(default="[]")