From 092f34757233d79bf54b45091540743891c86c9f Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sun, 12 Dec 2021 20:03:25 +0200 Subject: [PATCH] Migration --- ...3f105ea0_added_additional_chat_settings.py | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 migrations/versions/9d333f105ea0_added_additional_chat_settings.py diff --git a/migrations/versions/9d333f105ea0_added_additional_chat_settings.py b/migrations/versions/9d333f105ea0_added_additional_chat_settings.py new file mode 100644 index 0000000..052178a --- /dev/null +++ b/migrations/versions/9d333f105ea0_added_additional_chat_settings.py @@ -0,0 +1,30 @@ +"""Added additional chat settings + +Revision ID: 9d333f105ea0 +Revises: c639acad707a +Create Date: 2021-12-12 19:59:22.610129 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '9d333f105ea0' +down_revision = 'c639acad707a' +branch_labels = None +depends_on = None + + +def upgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.add_column('chats', sa.Column('report_to_admins', sa.Boolean(), server_default=sa.text('true'), nullable=True)) + op.add_column('chats', sa.Column('restrict_commands', sa.Boolean(), server_default=sa.text('true'), nullable=True)) + # ### end Alembic commands ### + + +def downgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.drop_column('chats', 'restrict_commands') + op.drop_column('chats', 'report_to_admins') + # ### end Alembic commands ###