text: """add mini bundle price
  
  Revision ID: e487c3f2bdd0
  Revises: 309c7f5348b4
  Create Date: 2021-08-27 09:04:18.924440
  
  """
  from alembic import op
  import sqlalchemy as sa
  
  
  # revision identifiers, used by Alembic.
  revision = "e487c3f2bdd0"
  down_revision = "309c7f5348b4"
  branch_labels = None
  depends_on = None
  
  
  def upgrade():
      # ### commands auto generated by Alembic - please adjust! ###
      op.create_table(
          "mini_bundle_price",
          sa.Column("id", sa.Integer(), nullable=False),
          sa.Column("mini_bundle_id", sa.Integer(), nullable=False),
          sa.Column("price", sa.Numeric(precision=10, scale=2), nullable=False),
          sa.Column("currency_id", sa.Integer(), nullable=False),
          sa.Column("country_id", sa.Integer(), nullable=True),
          sa.Column("region_id", sa.Integer(), nullable=True),
          sa.Column("fte_from", sa.Integer(), nullable=True),
          sa.Column("fte_to", sa.Integer(), nullable=True),
          sa.Column("year", sa.Integer(), nullable=False),
          sa.Column(
              "created_at", sa.DateTime(), server_default=sa.text("now()"), nullable=True
          ),
          sa.ForeignKeyConstraint(
              ["country_id"],
              ["countries.id"],
          ),
          sa.ForeignKeyConstraint(
              ["currency_id"],
              ["currency.id"],
          ),
          sa.ForeignKeyConstraint(
              ["mini_bundle_id"],
              ["mini_bundles.id"],
          ),
          sa.ForeignKeyConstraint(
              ["region_id"],
              ["regions.id"],
          ),
          sa.PrimaryKeyConstraint("id"),
      )
      op.create_index(
          op.f("ix_mini_bundle_price_currency_id"),
          "mini_bundle_price",
          ["currency_id"],
          unique=False,
      )
      op.create_index(
          op.f("ix_mini_bundle_price_mini_bundle_id"),
          "mini_bundle_price",
          ["mini_bundle_id"],
          unique=False,
      )
      op.create_index(
          op.f("ix_mini_bundle_price_year"), "mini_bundle_price", ["year"], unique=False
      )
      # ### end Alembic commands ###
  
  
  def downgrade():
      # ### commands auto generated by Alembic - please adjust! ###
      op.drop_index(op.f("ix_mini_bundle_price_year"), table_name="mini_bundle_price")
      op.drop_index(
          op.f("ix_mini_bundle_price_mini_bundle_id"), table_name="mini_bundle_price"
      )
      op.drop_index(
          op.f("ix_mini_bundle_price_currency_id"), table_name="mini_bundle_price"
      )
      op.drop_table("mini_bundle_price")
      # ### end Alembic commands ###
  