2
0
mirror of https://github.com/Nick80835/microbot synced 2025-08-30 14:08:31 +00:00

use BigIntegerField instead of FloatField and IntegerField

This commit is contained in:
Nick80835
2021-03-24 09:10:32 -04:00
parent f182ac90fb
commit 200ca7067d

View File

@@ -1,6 +1,6 @@
import ujson import ujson
from peewee import (BooleanField, FloatField, IntegerField, Model, from peewee import (BigIntegerField, BooleanField, Model, SqliteDatabase,
SqliteDatabase, TextField) TextField)
DATABASE = SqliteDatabase("database.sqlite") DATABASE = SqliteDatabase("database.sqlite")
@@ -11,15 +11,15 @@ class BaseDB(Model):
class BlacklistedUser(BaseDB): class BlacklistedUser(BaseDB):
user_id = IntegerField(unique=True, primary_key=True) user_id = BigIntegerField(unique=True, primary_key=True)
class SudoUser(BaseDB): class SudoUser(BaseDB):
user_id = IntegerField(unique=True, primary_key=True) user_id = BigIntegerField(unique=True, primary_key=True)
class Chat(BaseDB): class Chat(BaseDB):
chat_id = FloatField(unique=True, primary_key=True) chat_id = BigIntegerField(unique=True, primary_key=True)
fun_enabled = BooleanField(default=True) fun_enabled = BooleanField(default=True)
nsfw_enabled = BooleanField(default=True) nsfw_enabled = BooleanField(default=True)
disabled_commands = TextField(default="[]") disabled_commands = TextField(default="[]")