You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
796 B
Python

"""add year
Revision ID: 9b802c489174
Revises: 72cf3e7ce522
Create Date: 2022-02-13 19:05:06.565340
"""
from alembic import op
import sqlalchemy as sa
import sqlmodel # NEW
# revision identifiers, used by Alembic.
revision = '9b802c489174'
down_revision = '72cf3e7ce522'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('song', sa.Column('year', sa.Integer(), nullable=True))
op.create_index(op.f('ix_song_year'), 'song', ['year'], unique=False)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index(op.f('ix_song_year'), table_name='song')
op.drop_column('song', 'year')
# ### end Alembic commands ###