From ade132f031a25d747dd5f1d4904e7c98f0d8a116 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20B=C3=BChler?= Date: Fri, 2 Aug 2024 09:57:02 +0200 Subject: [PATCH] Add DB migration for new attributes --- ...add_group_key_and_icon_to_template_tabs.py | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 migrations/versions/bf584f934a0e_add_group_key_and_icon_to_template_tabs.py diff --git a/migrations/versions/bf584f934a0e_add_group_key_and_icon_to_template_tabs.py b/migrations/versions/bf584f934a0e_add_group_key_and_icon_to_template_tabs.py new file mode 100644 index 0000000..dc02382 --- /dev/null +++ b/migrations/versions/bf584f934a0e_add_group_key_and_icon_to_template_tabs.py @@ -0,0 +1,35 @@ +"""add group key and icon to template tabs + +Revision ID: bf584f934a0e +Revises: 566709537515 +Create Date: 2024-07-29 14:17:11.217783 + +""" + +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = "bf584f934a0e" +down_revision = "566709537515" +branch_labels = None +depends_on = None + + +def upgrade(): + # ### commands auto generated by Alembic - please adjust! ### + with op.batch_alter_table("TemplateTab", schema=None) as batch_op: + batch_op.add_column(sa.Column("icon", sa.String(length=64), nullable=True)) + batch_op.add_column(sa.Column("group_key", sa.String(length=32), nullable=True)) + + # ### end Alembic commands ### + + +def downgrade(): + # ### commands auto generated by Alembic - please adjust! ### + with op.batch_alter_table("TemplateTab", schema=None) as batch_op: + batch_op.drop_column("group_key") + batch_op.drop_column("icon") + + # ### end Alembic commands ###