1baf7a0c6aab_alert_table.py 592 B

1234567891011121314151617181920212223242526272829
  1. """alert table
  2. Revision ID: 1baf7a0c6aab
  3. Revises: e33bf2621069
  4. Create Date: 2021-12-13 16:28:02.806559
  5. """
  6. from alembic import op
  7. import sqlalchemy as sa
  8. # revision identifiers, used by Alembic.
  9. revision = '1baf7a0c6aab'
  10. down_revision = 'e33bf2621069'
  11. branch_labels = None
  12. depends_on = None
  13. def upgrade():
  14. op.add_column('nft',
  15. sa.Column('category', sa.String(10))
  16. )
  17. op.add_column('nft',
  18. sa.Column('is_active', sa.Boolean(), default=False, nullable=False)
  19. )
  20. def downgrade():
  21. op.drop_column('nft', 'category')
  22. op.drop_column('nft', 'is_actived')