Skip to content

Commit f174966

Browse files
ksmuczynskiactions-user
authored andcommitted
Formatting changes
1 parent d3de737 commit f174966

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

alembic/versions/a1b2c3d4e5f6_link_surface_water_photos_to_surface_water_data.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,15 @@ def upgrade() -> None:
3333
["SurfaceID"],
3434
ondelete="CASCADE",
3535
)
36-
op.execute(
37-
"""
36+
op.execute("""
3837
DELETE FROM "NMA_SurfaceWaterPhotos" p
3938
WHERE p."SurfaceID" IS NULL
4039
OR NOT EXISTS (
4140
SELECT 1
4241
FROM "NMA_SurfaceWaterData" d
4342
WHERE d."SurfaceID" = p."SurfaceID"
4443
)
45-
"""
46-
)
44+
""")
4745
op.alter_column(
4846
"NMA_SurfaceWaterPhotos",
4947
"SurfaceID",

alembic/versions/f6e5d4c3b2a1_add_thing_id_to_nma_weather_data.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,14 @@ def upgrade() -> None:
3333
ondelete="CASCADE",
3434
)
3535
# Backfill thing_id based on LocationId -> Thing.nma_pk_location
36-
op.execute(
37-
"""
36+
op.execute("""
3837
UPDATE "NMA_WeatherData" wd
3938
SET thing_id = t.id
4039
FROM thing t
4140
WHERE t.nma_pk_location IS NOT NULL
4241
AND wd."LocationId" IS NOT NULL
4342
AND t.nma_pk_location = wd."LocationId"::text
44-
"""
45-
)
43+
""")
4644
# Remove any rows that cannot be linked to a Thing, then enforce NOT NULL
4745
op.execute('DELETE FROM "NMA_WeatherData" WHERE thing_id IS NULL')
4846
op.alter_column(

0 commit comments

Comments
 (0)