Personal-Digital-Asset-Manager/migrations/versions/bea92ecef03b_add_license_key_column.py
Timothy Rogers b0a4567169 add code
2024-11-10 16:01:57 -05:00

32 lines
812 B
Python

"""Add license-key column
Revision ID: bea92ecef03b
Revises: 1234567890ab
Create Date: 2024-10-31 12:16:06.022171
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'bea92ecef03b'
down_revision = '1234567890ab'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('asset', schema=None) as batch_op:
batch_op.add_column(sa.Column('license_key', sa.String(length=255), nullable=True))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('asset', schema=None) as batch_op:
batch_op.drop_column('license_key')
# ### end Alembic commands ###