Skip to content

Commit

Permalink
Reapply "Merge pull request #416 from Open-Earth-Foundation/fix/missi…
Browse files Browse the repository at this point in the history
…ng_columns_country_code_table"

This reverts commit d778773.
  • Loading branch information
lemilonkh committed Apr 17, 2024
1 parent d778773 commit ea84128
Showing 1 changed file with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
"""EF_in_country_code_table
Revision ID: 949c5b9cc18d
Revises: 583858ff1aa8
Create Date: 2024-04-03 10:24:31.131245
"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = '949c5b9cc18d'
down_revision: Union[str, None] = '583858ff1aa8'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
op.add_column("country_code",
sa.Column("emission_factor_value", sa.Float, nullable=True))
op.add_column("country_code",
sa.Column("emission_factor_units",sa.String, nullable=True))


def downgrade() -> None:
op.drop_column("country_code", "emission_factor_value")
op.drop_column("country_code", "emission_factor_units")

0 comments on commit ea84128

Please sign in to comment.