text: """003_update_ISBN_10_uniqueNotNull
  
  Revision ID: 9cfe99e1dc90
  Revises: 04659e2c3a9a
  Create Date: 2022-01-21 02:26:33.478672
  
  """
  from alembic import op
  import sqlalchemy as sa
  
  
  # revision identifiers, used by Alembic.
  revision = '9cfe99e1dc90'
  down_revision = '04659e2c3a9a'
  branch_labels = None
  depends_on = None
  
  
  def upgrade():
      # ### commands auto generated by Alembic - please adjust! ###
      op.alter_column('books', 'ISBN_10',
                 existing_type=sa.VARCHAR(length=10),
                 nullable=False)
      op.create_unique_constraint(None, 'books', ['ISBN_10'])
      # ### end Alembic commands ###
  
  
  def downgrade():
      # ### commands auto generated by Alembic - please adjust! ###
      op.drop_constraint(None, 'books', type_='unique')
      op.alter_column('books', 'ISBN_10',
                 existing_type=sa.VARCHAR(length=10),
                 nullable=True)
      # ### end Alembic commands ###
  