Skip to content

Commit

Permalink
Add DB migration for new attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
buehlefs committed Aug 2, 2024
1 parent df414b6 commit ade132f
Showing 1 changed file with 35 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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 ###

0 comments on commit ade132f

Please # to comment.