content: """project id to string anddelete col
  
  Revision ID: 20240823164559_05069444feee
  Revises: 20240820182032_d3f532773223
  Create Date: 2024-08-23 16:45:59.991109
  
  """
  
  from typing import Sequence, Union
  
  import sqlalchemy as sa
  from alembic import op
  
  # revision identifiers, used by Alembic.
  revision: str = "20240823164559_05069444feee"
  down_revision: Union[str, None] = "20240820182032_d3f532773223"
  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.alter_column(
          "projects",
          "id",
          existing_type=sa.INTEGER(),
          type_=sa.Text(),
          existing_nullable=False,
      )
      op.drop_constraint("projects_directory_key", "projects", type_="unique")
      op.drop_column("projects", "directory")
      op.drop_column("projects", "is_default")
      op.drop_column("projects", "project_name")
      op.drop_constraint("check_status", "projects", type_="check")
      op.create_check_constraint(
          "check_status",
          "projects",
          "status IN ('submitted', 'cloned', 'parsed', 'ready', 'error')",
      )
      # ### end Alembic commands ###
  
  
  def downgrade() -> None:
      # ### commands auto generated by Alembic - please adjust! ###
      op.add_column(
          "projects",
          sa.Column("project_name", sa.TEXT(), autoincrement=False, nullable=True),
      )
      op.add_column(
          "projects",
          sa.Column("is_default", sa.BOOLEAN(), autoincrement=False, nullable=True),
      )
      op.add_column(
          "projects",
          sa.Column("directory", sa.TEXT(), autoincrement=False, nullable=True),
      )
      op.create_unique_constraint("projects_directory_key", "projects", ["directory"])
      op.alter_column(
          "projects",
          "id",
          existing_type=sa.Text(),
          type_=sa.INTEGER(),
          existing_nullable=False,
      )
      op.drop_constraint("check_status", "projects", type_="check")
      op.create_check_constraint(
          "check_status", "projects", "status IN ('created', 'ready', 'error')"
      )
      # ### end Alembic commands ###
  