text: """books table
  
  Revision ID: efbc8c140b8d
  Revises: 860dc474c986
  Create Date: 2021-11-09 21:44:03.494334
  
  """
  from alembic import op
  import sqlalchemy as sa
  
  
  # revision identifiers, used by Alembic.
  revision = 'efbc8c140b8d'
  down_revision = '860dc474c986'
  branch_labels = None
  depends_on = None
  
  
  def upgrade():
      # ### commands auto generated by Alembic - please adjust! ###
      op.create_table('books',
      sa.Column('id', sa.Integer(), nullable=False),
      sa.Column('title', sa.String(length=200), nullable=True),
      sa.Column('total_pages', sa.Integer(), nullable=True),
      sa.Column('user_id', sa.Integer(), nullable=True),
      sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
      sa.PrimaryKeyConstraint('id')
      )
      op.create_index(op.f('ix_books_title'), 'books', ['title'], unique=False)
      # ### end Alembic commands ###
  
  
  def downgrade():
      # ### commands auto generated by Alembic - please adjust! ###
      op.drop_index(op.f('ix_books_title'), table_name='books')
      op.drop_table('books')
      # ### end Alembic commands ###
  