text: """init
  
  Revision ID: 1d440ed11fcd
  Revises:
  Create Date: 2022-04-05 14:40:05.411227
  
  """
  import sqlalchemy as sa
  from alembic import op
  
  # revision identifiers, used by Alembic.
  revision = "1d440ed11fcd"
  down_revision = None
  branch_labels = None
  depends_on = None
  
  
  def upgrade():
      # ### commands auto generated by Alembic - please adjust! ###
      op.create_table(
          "users",
          sa.Column("id", sa.Integer(), nullable=False),
          sa.Column("name", sa.String(), nullable=True),
          sa.Column("email", sa.String(), nullable=True),
          sa.Column("password", sa.String(), nullable=True),
          sa.PrimaryKeyConstraint("id"),
      )
      with op.batch_alter_table("users", schema=None) as batch_op:
          batch_op.create_index(batch_op.f("ix_users_id"), ["id"], unique=False)
  
      op.create_table(
          "blogs",
          sa.Column("id", sa.Integer(), nullable=False),
          sa.Column("title", sa.String(), nullable=True),
          sa.Column("body", sa.String(), nullable=True),
          sa.Column("user_id", sa.Integer(), nullable=True),
          sa.ForeignKeyConstraint(["user_id"], ["users.id"],),
          sa.PrimaryKeyConstraint("id"),
      )
      with op.batch_alter_table("blogs", schema=None) as batch_op:
          batch_op.create_index(batch_op.f("ix_blogs_id"), ["id"], unique=False)
  
      # ### end Alembic commands ###
  
  
  def downgrade():
      # ### commands auto generated by Alembic - please adjust! ###
      with op.batch_alter_table("blogs", schema=None) as batch_op:
          batch_op.drop_index(batch_op.f("ix_blogs_id"))
  
      op.drop_table("blogs")
      with op.batch_alter_table("users", schema=None) as batch_op:
          batch_op.drop_index(batch_op.f("ix_users_id"))
  
      op.drop_table("users")
      # ### end Alembic commands ###
  