Files
microblog/migrations/versions/619062c0486b_followers.py
2023-06-04 01:00:41 +02:00

34 lines
840 B
Python

"""followers
Revision ID: 619062c0486b
Revises: 680d311746e8
Create Date: 2023-06-03 21:28:40.382514
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '619062c0486b'
down_revision = '680d311746e8'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('followers',
sa.Column('follower_id', sa.Integer(), nullable=True),
sa.Column('followed_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['followed_id'], ['user.id'], ),
sa.ForeignKeyConstraint(['follower_id'], ['user.id'], )
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('followers')
# ### end Alembic commands ###