Change permaban data type to boolean instead of smallint

This commit is contained in:
rsakeys 2019-09-01 06:24:36 +04:00
parent e62b4f6bd7
commit 675099f70c
2 changed files with 2 additions and 2 deletions

View File

@ -467,7 +467,7 @@ CREATE TABLE penguin (
feet INT DEFAULT NULL,
photo INT DEFAULT NULL,
flag INT DEFAULT NULL,
permaban SMALLINT NOT NULL DEFAULT 0,
permaban BOOLEAN NOT NULL DEFAULT FALSE,
book_modified SMALLINT NOT NULL DEFAULT 0,
book_color SMALLINT NOT NULL DEFAULT 1,
book_highlight SMALLINT NOT NULL DEFAULT 1,

View File

@ -40,7 +40,7 @@ class Penguin(db.Model):
feet = db.Column(db.ForeignKey('item.id', ondelete='CASCADE', onupdate='CASCADE'))
photo = db.Column(db.ForeignKey('item.id', ondelete='CASCADE', onupdate='CASCADE'))
flag = db.Column(db.ForeignKey('item.id', ondelete='CASCADE', onupdate='CASCADE'))
permaban = db.Column(db.SmallInteger, nullable=False, server_default=db.text("0"))
permaban = db.Column(db.Boolean, nullable=False, server_default=db.text("false"))
book_modified = db.Column(db.SmallInteger, nullable=False, server_default=db.text("0"))
book_color = db.Column(db.SmallInteger, nullable=False, server_default=db.text("1"))
book_highlight = db.Column(db.SmallInteger, nullable=False, server_default=db.text("1"))