You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
961 B

  1. """empty message
  2. Revision ID: d1ab608c102a
  3. Revises: 53a175284ebe
  4. Create Date: 2018-11-23 23:40:00.232851
  5. """
  6. from alembic import op
  7. import sqlalchemy as sa
  8. # revision identifiers, used by Alembic.
  9. revision = 'd1ab608c102a'
  10. down_revision = '53a175284ebe'
  11. branch_labels = None
  12. depends_on = None
  13. def upgrade():
  14. # ### commands auto generated by Alembic - please adjust! ###
  15. op.create_table('follows',
  16. sa.Column('follower_id', sa.Integer(), nullable=False),
  17. sa.Column('followed_id', sa.Integer(), nullable=False),
  18. sa.Column('timestamp', sa.DateTime(), nullable=True),
  19. sa.ForeignKeyConstraint(['followed_id'], ['users.id'], ),
  20. sa.ForeignKeyConstraint(['follower_id'], ['users.id'], ),
  21. sa.PrimaryKeyConstraint('follower_id', 'followed_id')
  22. )
  23. # ### end Alembic commands ###
  24. def downgrade():
  25. # ### commands auto generated by Alembic - please adjust! ###
  26. op.drop_table('follows')
  27. # ### end Alembic commands ###