content: """Add ON DELETE CASCADE to Message.conversation_id
  
  Revision ID: 20240813145447_56e7763c7d20
  Revises: 20240812211350_bcc569077106
  Create Date: 2024-08-13 14:54:47.718210
  
  """
  
  from typing import Sequence, Union
  
  from alembic import op
  
  # revision identifiers, used by Alembic.
  revision: str = "20240813145447_56e7763c7d20"
  down_revision: Union[str, None] = "20240812211350_bcc569077106"
  branch_labels: Union[str, Sequence[str], None] = None
  depends_on: Union[str, Sequence[str], None] = None
  
  
  def upgrade() -> None:
      # ### commands auto generated by Alembic - please adjust! ###
      op.drop_constraint("messages_conversation_id_fkey", "messages", type_="foreignkey")
      op.create_foreign_key(
          None,
          "messages",
          "conversations",
          ["conversation_id"],
          ["id"],
          ondelete="CASCADE",
      )
      # ### end Alembic commands ###
  
  
  def downgrade() -> None:
      # ### commands auto generated by Alembic - please adjust! ###
      op.drop_constraint(None, "messages", type_="foreignkey")
      op.create_foreign_key(
          "messages_conversation_id_fkey",
          "messages",
          "conversations",
          ["conversation_id"],
          ["id"],
      )
      # ### end Alembic commands ###
  