Skip to content

Commit

Permalink
Add DB migration script
Browse files Browse the repository at this point in the history
Signed-off-by: Nikola Forró <[email protected]>
  • Loading branch information
nforro committed Oct 22, 2024
1 parent 5124591 commit 5ec4c47
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions alembic/versions/adb6be5bc358_add_sidetag_and_nvr_fields_to_.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
"""Add sidetag and nvr fields to KojiBuildTargetModel
Revision ID: adb6be5bc358
Revises: f376be1907e1
Create Date: 2024-10-20 15:47:45.454965
"""

import sqlalchemy as sa

from alembic import op

# revision identifiers, used by Alembic.
revision = "adb6be5bc358"
down_revision = "f376be1907e1"
branch_labels = None
depends_on = None


def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column(
"koji_build_targets",
sa.Column("sidetag", sa.String(), nullable=True),
)
op.add_column("koji_build_targets", sa.Column("nvr", sa.String(), nullable=True))
# ### end Alembic commands ###


def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column("koji_build_targets", "nvr")
op.drop_column("koji_build_targets", "sidetag")
# ### end Alembic commands ###

0 comments on commit 5ec4c47

Please sign in to comment.