5fda94355fce_custom_disclaimer.py 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. """Custom Disclaimer
  2. Revision ID: 5fda94355fce
  3. Revises: 47cc7df8c4f3
  4. Create Date: 2024-05-10 20:04:45.806549
  5. """
  6. import sqlalchemy as sa
  7. from alembic import op
  8. import models as models
  9. # revision identifiers, used by Alembic.
  10. revision = '5fda94355fce'
  11. down_revision = '47cc7df8c4f3'
  12. branch_labels = None
  13. depends_on = None
  14. def upgrade():
  15. # ### commands auto generated by Alembic - please adjust! ###
  16. with op.batch_alter_table('recommended_apps', schema=None) as batch_op:
  17. batch_op.add_column(sa.Column('custom_disclaimer', sa.String(length=255), nullable=True))
  18. with op.batch_alter_table('sites', schema=None) as batch_op:
  19. batch_op.add_column(sa.Column('custom_disclaimer', sa.String(length=255), nullable=True))
  20. with op.batch_alter_table('tool_api_providers', schema=None) as batch_op:
  21. batch_op.add_column(sa.Column('custom_disclaimer', sa.String(length=255), nullable=True))
  22. # ### end Alembic commands ###
  23. def downgrade():
  24. # ### commands auto generated by Alembic - please adjust! ###
  25. with op.batch_alter_table('tool_api_providers', schema=None) as batch_op:
  26. batch_op.drop_column('custom_disclaimer')
  27. with op.batch_alter_table('sites', schema=None) as batch_op:
  28. batch_op.drop_column('custom_disclaimer')
  29. with op.batch_alter_table('recommended_apps', schema=None) as batch_op:
  30. batch_op.drop_column('custom_disclaimer')
  31. # ### end Alembic commands ###