ScoDoc/migrations/versions/c8efc54586d8_ue_semestre_idx.py

31 lines
843 B
Python
Raw Normal View History

2021-11-14 18:09:20 +01:00
"""UE.semestre_idx
Revision ID: c8efc54586d8
Revises: 6cfc21a7ae1b
Create Date: 2021-11-14 17:35:39.602613
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
2022-07-11 13:39:50 +02:00
revision = 'c8efc54586d8'
down_revision = '6cfc21a7ae1b'
2021-11-14 18:09:20 +01:00
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
2022-07-11 13:39:50 +02:00
op.add_column('notes_ue', sa.Column('semestre_idx', sa.Integer(), nullable=True))
op.create_index(op.f('ix_notes_ue_semestre_idx'), 'notes_ue', ['semestre_idx'], unique=False)
2021-11-14 18:09:20 +01:00
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
2022-07-11 13:39:50 +02:00
op.drop_index(op.f('ix_notes_ue_semestre_idx'), table_name='notes_ue')
op.drop_column('notes_ue', 'semestre_idx')
2021-11-14 18:09:20 +01:00
# ### end Alembic commands ###