Skip to content

Commit

Permalink
Merge pull request #416 from Open-Earth-Foundation/fix/missing_column…
Browse files Browse the repository at this point in the history
…s_country_code_table

fix:adding_missing_columns
  • Loading branch information
mfonsecaOEF authored Apr 16, 2024
2 parents 2f67201 + 988f3f7 commit 8cdd40b
Showing 1 changed file with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
"""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.alter_column("country_code", "emission_factor_value", nullable=True, type_=sa.Float)
op.alter_column("country_code", "emission_factor_units", nullable=True, type_=sa.String)


def downgrade() -> None:
op.drop_column("country_code", "emission_factor_value", nullable=False, type_=sa.Float)
op.drop_column("country_code", "emission_factor_units", nullable=False, type_=sa.String)

0 comments on commit 8cdd40b

Please sign in to comment.