haldis/app/migrations/versions/f6a6004bf4b9_add_user_associations.py

29 lines
812 B
Python
Raw Normal View History

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