content: """custom_agent_sharing
  
  Revision ID: 20250310201406_97a740b07a50
  Revises: 20250303164854_414f9ab20475
  Create Date: 2025-03-10 20:14:06.456798
  
  """
  
  from typing import Sequence, Union
  
  from alembic import op
  import sqlalchemy as sa
  
  # revision identifiers, used by Alembic.
  revision: str = "20250310201406_97a740b07a50"
  down_revision: Union[str, None] = "20250303164854_414f9ab20475"
  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.create_table(
          "custom_agent_shares",
          sa.Column("id", sa.String(), nullable=False),
          sa.Column("agent_id", sa.String(), nullable=False),
          sa.Column("shared_with_user_id", sa.String(), nullable=False),
          sa.Column("created_at", sa.DateTime(timezone=True), nullable=False),
          sa.ForeignKeyConstraint(["agent_id"], ["custom_agents.id"], ondelete="CASCADE"),
          sa.ForeignKeyConstraint(
              ["shared_with_user_id"], ["users.uid"], ondelete="CASCADE"
          ),
          sa.PrimaryKeyConstraint("id"),
      )
      # ### end Alembic commands ###
  
  
  def downgrade() -> None:
      # ### commands auto generated by Alembic - please adjust! ###
      op.drop_table("custom_agent_shares")
      # ### end Alembic commands ###
  