Skip to content

Commit 1ef94a9

Browse files
authored
Merge pull request #537 from DataIntegrationGroup/BDMS-576-Verify-that-all-data-associated-with-relevant-PointIDs-was-transferred-from-SQL-to-Postgres-successfully
BDMS-576: Add transfer accountability tooling, duplicate WellData comparison, transfer hardening/perf, and nullable schema updates
2 parents 6064925 + 7824779 commit 1ef94a9

48 files changed

Lines changed: 3887 additions & 442 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ jobs:
104104
BASE_URL: http://localhost:8000
105105
SESSION_SECRET_KEY: supersecretkeyforunittests
106106
AUTHENTIK_DISABLE_AUTHENTICATION: 1
107+
DROP_AND_REBUILD_DB: 1
107108

108109
services:
109110
postgis:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ transfers/logs/*
4545
run_bdd-local.sh
4646
.pre-commit-config.local.yaml
4747
.serena/
48+
cli/logs
4849

4950
# deployment files
5051
app.yaml

alembic/versions/43bc34504ee6_merge_migrations_after_staging_merge.py

Lines changed: 0 additions & 25 deletions
This file was deleted.

alembic/versions/50d1c2a3b4c5_add_unique_index_ngwmn_wellconstruction.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Add unique index for NGWMN well construction
22
33
Revision ID: 50d1c2a3b4c5
4-
Revises: 43bc34504ee6
4+
Revises: 3cb924ca51fd
55
Create Date: 2026-01-31 00:27:12.204176
66
77
"""
@@ -12,7 +12,7 @@
1212

1313
# revision identifiers, used by Alembic.
1414
revision: str = "50d1c2a3b4c5"
15-
down_revision: Union[str, Sequence[str], None] = "43bc34504ee6"
15+
down_revision: Union[str, Sequence[str], None] = "3cb924ca51fd"
1616
branch_labels: Union[str, Sequence[str], None] = None
1717
depends_on: Union[str, Sequence[str], None] = None
1818

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
"""make measuring_point_history.measuring_point_height nullable
2+
3+
Revision ID: 8c9d0e1f2a3b
4+
Revises: 5336a52336df
5+
Create Date: 2026-02-21 12:00:00.000000
6+
7+
"""
8+
9+
from typing import Sequence, Union
10+
11+
import sqlalchemy as sa
12+
from alembic import op
13+
14+
# revision identifiers, used by Alembic.
15+
revision: str = "8c9d0e1f2a3b"
16+
down_revision: Union[str, Sequence[str], None] = "5336a52336df"
17+
branch_labels: Union[str, Sequence[str], None] = None
18+
depends_on: Union[str, Sequence[str], None] = None
19+
20+
21+
def upgrade() -> None:
22+
op.alter_column(
23+
"measuring_point_history",
24+
"measuring_point_height",
25+
existing_type=sa.Numeric(),
26+
nullable=True,
27+
)
28+
29+
30+
def downgrade() -> None:
31+
op.alter_column(
32+
"measuring_point_history",
33+
"measuring_point_height",
34+
existing_type=sa.Numeric(),
35+
nullable=False,
36+
)
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
"""make address.postal_code nullable
2+
3+
Revision ID: 9a0b1c2d3e4f
4+
Revises: 8c9d0e1f2a3b
5+
Create Date: 2026-02-21 13:00:00.000000
6+
7+
"""
8+
9+
from typing import Sequence, Union
10+
11+
import sqlalchemy as sa
12+
from alembic import op
13+
14+
# revision identifiers, used by Alembic.
15+
revision: str = "9a0b1c2d3e4f"
16+
down_revision: Union[str, Sequence[str], None] = "8c9d0e1f2a3b"
17+
branch_labels: Union[str, Sequence[str], None] = None
18+
depends_on: Union[str, Sequence[str], None] = None
19+
20+
21+
def upgrade() -> None:
22+
op.alter_column(
23+
"address",
24+
"postal_code",
25+
existing_type=sa.String(length=20),
26+
nullable=True,
27+
)
28+
29+
30+
def downgrade() -> None:
31+
op.alter_column(
32+
"address",
33+
"postal_code",
34+
existing_type=sa.String(length=20),
35+
nullable=False,
36+
)
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
"""make deployment installation_date nullable
2+
3+
Revision ID: a1b2c3d4e5f7
4+
Revises: 9a0b1c2d3e4f
5+
Create Date: 2026-02-21 14:32:00.000000
6+
7+
"""
8+
9+
from typing import Sequence, Union
10+
11+
import sqlalchemy as sa
12+
from alembic import op
13+
14+
# revision identifiers, used by Alembic.
15+
revision: str = "a1b2c3d4e5f7"
16+
down_revision: Union[str, Sequence[str], None] = "9a0b1c2d3e4f"
17+
branch_labels: Union[str, Sequence[str], None] = None
18+
depends_on: Union[str, Sequence[str], None] = None
19+
20+
21+
def upgrade() -> None:
22+
op.alter_column(
23+
"deployment",
24+
"installation_date",
25+
existing_type=sa.Date(),
26+
nullable=True,
27+
)
28+
29+
30+
def downgrade() -> None:
31+
op.alter_column(
32+
"deployment",
33+
"installation_date",
34+
existing_type=sa.Date(),
35+
nullable=False,
36+
)
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
"""make wellscreen depth fields nullable
2+
3+
Revision ID: b3c4d5e6f7a8
4+
Revises: a1b2c3d4e5f7
5+
Create Date: 2026-02-21 15:20:00.000000
6+
7+
"""
8+
9+
from typing import Sequence, Union
10+
11+
import sqlalchemy as sa
12+
from alembic import op
13+
14+
# revision identifiers, used by Alembic.
15+
revision: str = "b3c4d5e6f7a8"
16+
down_revision: Union[str, Sequence[str], None] = "a1b2c3d4e5f7"
17+
branch_labels: Union[str, Sequence[str], None] = None
18+
depends_on: Union[str, Sequence[str], None] = None
19+
20+
21+
def upgrade() -> None:
22+
op.alter_column(
23+
"well_screen",
24+
"screen_depth_top",
25+
existing_type=sa.Float(),
26+
nullable=True,
27+
)
28+
op.alter_column(
29+
"well_screen",
30+
"screen_depth_bottom",
31+
existing_type=sa.Float(),
32+
nullable=True,
33+
)
34+
35+
36+
def downgrade() -> None:
37+
op.alter_column(
38+
"well_screen",
39+
"screen_depth_bottom",
40+
existing_type=sa.Float(),
41+
nullable=False,
42+
)
43+
op.alter_column(
44+
"well_screen",
45+
"screen_depth_top",
46+
existing_type=sa.Float(),
47+
nullable=False,
48+
)
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
"""make address.city and address.state nullable
2+
3+
Revision ID: c4d5e6f7a8b9
4+
Revises: b3c4d5e6f7a8
5+
Create Date: 2026-02-21 16:30:00.000000
6+
7+
"""
8+
9+
from typing import Sequence, Union
10+
11+
import sqlalchemy as sa
12+
from alembic import op
13+
14+
# revision identifiers, used by Alembic.
15+
revision: str = "c4d5e6f7a8b9"
16+
down_revision: Union[str, Sequence[str], None] = "b3c4d5e6f7a8"
17+
branch_labels: Union[str, Sequence[str], None] = None
18+
depends_on: Union[str, Sequence[str], None] = None
19+
20+
21+
def upgrade() -> None:
22+
op.alter_column(
23+
"address",
24+
"city",
25+
existing_type=sa.String(length=100),
26+
nullable=True,
27+
)
28+
op.alter_column(
29+
"address",
30+
"state",
31+
existing_type=sa.String(length=50),
32+
nullable=True,
33+
)
34+
35+
36+
def downgrade() -> None:
37+
op.alter_column(
38+
"address",
39+
"city",
40+
existing_type=sa.String(length=100),
41+
nullable=False,
42+
)
43+
op.alter_column(
44+
"address",
45+
"state",
46+
existing_type=sa.String(length=50),
47+
nullable=False,
48+
)

api/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# API
2+
3+
This directory contains FastAPI route modules grouped by resource/domain.
4+
5+
## Structure
6+
7+
- One module per domain (for example `thing.py`, `contact.py`, `observation.py`)
8+
- `api/ogc/` contains OGC-specific endpoints
9+
10+
## Guidelines
11+
12+
- Keep endpoints focused on transport concerns (request/response, status codes).
13+
- Put transfer/business logic in service or transfer modules.
14+
- Ensure response schemas match `schemas/` definitions.
15+
16+
## Running locally
17+
18+
Use project entrypoint from repo root (see top-level README for full setup).

0 commit comments

Comments
 (0)