2026072531_finalize_authorisation_f5fc28123cc0.py 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. """finalize_authorisation
  2. Revision ID: f5fc28123cc0
  3. Revises: f7a9944a660c
  4. Create Date: 2026-07-25 00:31:02.716514
  5. """
  6. import sqlalchemy as sa
  7. from alembic import op
  8. # revision identifiers, used by Alembic.
  9. revision = "f5fc28123cc0"
  10. down_revision = "f7a9944a660c"
  11. branch_labels = None
  12. depends_on = None
  13. def upgrade():
  14. # ### commands auto generated by Alembic - please adjust! ###
  15. op.add_column(
  16. "organizations",
  17. sa.Column(
  18. "created_at",
  19. sa.DateTime(timezone=True),
  20. server_default=sa.text("now()"),
  21. nullable=False,
  22. ),
  23. )
  24. op.add_column(
  25. "organizations", sa.Column("updated_at", sa.DateTime(timezone=True), nullable=True)
  26. )
  27. op.add_column(
  28. "volunteer_groups",
  29. sa.Column(
  30. "created_at",
  31. sa.DateTime(timezone=True),
  32. server_default=sa.text("now()"),
  33. nullable=False,
  34. ),
  35. )
  36. op.add_column(
  37. "volunteer_groups", sa.Column("updated_at", sa.DateTime(timezone=True), nullable=True)
  38. )
  39. # ### end Alembic commands ###
  40. def downgrade():
  41. # ### commands auto generated by Alembic - please adjust! ###
  42. op.drop_column("volunteer_groups", "updated_at")
  43. op.drop_column("volunteer_groups", "created_at")
  44. op.drop_column("organizations", "updated_at")
  45. op.drop_column("organizations", "created_at")
  46. # ### end Alembic commands ###