Advertisement
Mochinov

Untitled

May 18th, 2023
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. """Change field replenishment_forecasts_hub
  2.  
  3. Revision ID: 242709906bc4
  4. Revises: 972d36690057
  5. Create Date: 2023-05-17 12:54:16.612251
  6.  
  7. """
  8. from alembic import op
  9. import sqlalchemy as sa
  10.  
  11. import clickhouse_sqlalchemy.types.common as common
  12. from clickhouse_sqlalchemy import engines
  13.  
  14.  
  15.  
  16. # revision identifiers, used by Alembic.
  17. revision = '242709906bc4'
  18. down_revision = '972d36690057'
  19. branch_labels = None
  20. depends_on = None
  21.  
  22.  
  23. def upgrade():
  24. op.drop_column(
  25. 'replenishment_forecasts_hub',
  26. 'nub_nm',
  27. )
  28. op.add_column(
  29. 'replenishment_forecasts_hub',
  30. sa.Column(
  31. 'hub_nm',
  32. common.String,
  33. nullable=False,
  34. )
  35. )
  36.  
  37.  
  38.  
  39. def downgrade():
  40. op.drop_column(
  41. 'replenishment_forecasts_hub',
  42. 'hub_nm',
  43. )
  44. op.add_column(
  45. 'replenishment_forecasts_hub',
  46. sa.Column(
  47. 'nub_nm',
  48. common.String,
  49. nullable=False,
  50. )
  51. )
  52.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement