Skip to content

Commit

Permalink
style(backend): applied black
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxime Vergez committed Nov 6, 2023
1 parent b0b4e24 commit 8695b72
Showing 1 changed file with 14 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,39 @@


# revision identifiers, used by Alembic.
revision = 'f22d70b8fcfa'
down_revision = 'f7374cd6e38d'
revision = "f22d70b8fcfa"
down_revision = "f7374cd6e38d"
branch_labels = None
depends_on = None


def upgrade():
op.execute("""
op.execute(
"""
ALTER TABLE ref_geo.bib_areas_types
ADD COLUMN size_hierarchy INT default NULL;
COMMENT ON COLUMN ref_geo.bib_areas_types.size_hierarchy IS
'Diamètre moyen en mètres de ce type zone. Permet d''établir une hiérarchie des types '
'de zone géographique. Utile pour le floutage des observations.' ;
""")
"""
)

op.execute("""
op.execute(
"""
UPDATE ref_geo.bib_areas_types SET size_hierarchy = 200000 WHERE type_code = 'REG' ;
UPDATE ref_geo.bib_areas_types SET size_hierarchy = 75000 WHERE type_code = 'DEP' ;
UPDATE ref_geo.bib_areas_types SET size_hierarchy = 5000 WHERE type_code = 'COM' ;
UPDATE ref_geo.bib_areas_types SET size_hierarchy = 10000 WHERE type_code = 'M10' ;
UPDATE ref_geo.bib_areas_types SET size_hierarchy = 5000 WHERE type_code = 'M5' ;
UPDATE ref_geo.bib_areas_types SET size_hierarchy = 1000 WHERE type_code = 'M1' ;
""")
"""
)


def downgrade():
op.execute("""
op.execute(
"""
ALTER TABLE ref_geo.bib_areas_types
DROP COLUMN size_hierarchy;
""")
"""
)

0 comments on commit 8695b72

Please sign in to comment.