haldis/app/migrations/versions/f6a6004bf4b9_add_user_associations.py

29 lines
812 B
Python
Raw Normal View History

2022-05-20 21:34:18 +02:00
"""Add user associations
2022-05-24 21:26:51 +02:00
Revision ID: f6a6004bf4b9
2022-05-20 21:34:18 +02:00
Revises: 55013fe95bea
2022-05-24 21:26:51 +02:00
Create Date: 2022-05-24 21:23:27.770365
2022-05-20 21:34:18 +02:00
"""
# revision identifiers, used by Alembic.
2022-05-24 21:26:51 +02:00
revision = 'f6a6004bf4b9'
2022-05-20 21:34:18 +02:00
down_revision = '55013fe95bea'
from alembic import op
import sqlalchemy as sa
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
2022-05-24 21:26:51 +02:00
op.add_column('order', sa.Column('association', sa.String(length=120), server_default='', nullable=False))
2022-05-30 18:50:46 +02:00
op.add_column('user', sa.Column('associations', sa.String(length=255), server_default='', nullable=False))
2022-05-20 21:34:18 +02:00
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('user', 'associations')
op.drop_column('order', 'association')
# ### end Alembic commands ###