diff --git a/alembic/versions/73ffa12c03c8_initial.py b/alembic/versions/73ffa12c03c8_initial.py index de91f58..9fa0984 100644 --- a/alembic/versions/73ffa12c03c8_initial.py +++ b/alembic/versions/73ffa12c03c8_initial.py @@ -22,7 +22,7 @@ def upgrade() -> None: sa.Column('username', sa.String(length=32), nullable=True), sa.Column('first_name', sa.String(length=255), nullable=True), sa.Column('last_name', sa.String(length=255), nullable=True), - sa.Column('is_banned', sa.Boolean(), nullable=False), + sa.Column('is_banned', sa.Boolean(), server_default='False', nullable=False), sa.Column('deep_link', sa.String(length=225), nullable=True), sa.Column('created_at', sa.DateTime(timezone=True), server_default=sa.text('now()'), nullable=True), sa.Column('updated_at', sa.DateTime(timezone=True), server_default=sa.text('now()'), nullable=True), diff --git a/docker-compose.yml b/docker-compose.yml index cbee580..68daa26 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,4 @@ -version: '3.3' +version: '2.4' services: bot: diff --git a/tgbot/models/user.py b/tgbot/models/user.py index 64117c0..ed56630 100644 --- a/tgbot/models/user.py +++ b/tgbot/models/user.py @@ -8,5 +8,5 @@ class User(TimedBaseModel): username = db.Column(db.String(32), nullable=True) first_name = db.Column(db.String(255), nullable=True) last_name = db.Column(db.String(255), nullable=True) - is_banned = db.Column(db.Boolean, nullable=False, default=False) + is_banned = db.Column(db.Boolean, server_default="False", nullable=False) deep_link = db.Column(db.String(225), nullable=True)