Odd fields in User model removed. Schemas updated

This commit is contained in:
2023-07-29 23:46:33 +03:00
parent eb19113d78
commit 86acf3e326
6 changed files with 70 additions and 21 deletions

View File

@ -0,0 +1,30 @@
"""odd fields in user model removed. links between User and Announcement added. UserDatabase renamed to User
Revision ID: 6ef6877e89ff
Revises: 57c3df575fa5
Create Date: 2023-07-29 23:35:33.833531
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '6ef6877e89ff'
down_revision = '57c3df575fa5'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('users', 'password')
op.drop_column('users', 'phone')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('users', sa.Column('phone', sa.INTEGER(), nullable=True))
op.add_column('users', sa.Column('password', sa.VARCHAR(), nullable=True))
# ### end Alembic commands ###