diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 336ef71..829ac98 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,7 +35,9 @@ jobs: with: python-version: 3.9 - name: install Poetry - uses: snok/install-poetry@v1.3.3 + uses: snok/install-poetry@v1.4.1 + with: + version: 1.8.5 - name: cache Poetry virtualenv uses: actions/cache@v4 id: cache diff --git a/api/db/models/bills.py b/api/db/models/bills.py index dfadd39..0ad26cc 100644 --- a/api/db/models/bills.py +++ b/api/db/models/bills.py @@ -96,6 +96,7 @@ class BillIdentifier(BillRelatedBase, Base): __tablename__ = "opencivicdata_billidentifier" identifier = Column(String) + bill_id = Column(String, ForeignKey(Bill.id)) class BillAction(BillRelatedBase, Base): diff --git a/api/schemas.py b/api/schemas.py index 0615602..369a9fd 100644 --- a/api/schemas.py +++ b/api/schemas.py @@ -146,6 +146,13 @@ class Config: orm_mode = True +class BillIdentifier(BaseModel): + identifier: str = Field(..., example="ocd-bill-mn-2025_2026-sf827") + + class Config: + orm_mode = True + + class CompactJurisdiction(BaseModel): id: str = Field(..., example="ocd-jurisdiction/country:us/state:nc/government") name: str = Field(..., example="North Carolina") @@ -170,6 +177,7 @@ class CompactBill(BaseModel): session: str identifier: str title: str + other_identifiers: Optional[List[BillIdentifier]] class Config: orm_mode = True @@ -238,13 +246,6 @@ class Config: orm_mode = True -class BillIdentifier(BaseModel): - identifier: str = Field(..., example="HB 74") - - class Config: - orm_mode = True - - class BillSponsorship(BaseModel): id: UUID = Field(..., example="f0049138-1ad8-4506-a2a4-f4dd1251bbba") name: str = Field(..., example="JONES")