usdigitalresponse / cpf-reporter

CPF Reporter application maintained by the USDR Grants program.
Apache License 2.0
0 stars 4 forks source link

[Issue]: Remove organization as a field on reporting period #281

Open laurelkorwin opened 5 months ago

laurelkorwin commented 5 months ago

Why is this issue important?

This is the final step of the schema changes described in #217 . Organization will no longer be a field on reporting period, instead each organization will have preferences JSON that contains a reporting_period_id

Current State

organization is a field on reporting_period in the DB and GraphQL schema

Expected State

organization is no longer a field on reporting_period in DB or GraphQL schema

Implementation Plan

Need to wait for this: https://github.com/usdigitalresponse/cpf-reporter/commit/94b3f15ad76b36be5a91c7bf99ce9ff3da3d6ebd to be merged, and then:

  1. Remove organization and organizationId from reportingPeriod in schema.prisma and migrate / create SQL migration file
  2. Remove organization from reportingPeriod in GraphQL schema definition files
  3. Remove any resolvers connecting the two entities in reportingPeriod.ts and organization.ts

Relevant Code Snippets

No response

vshia commented 3 months ago

Here's the PR for it: https://github.com/usdigitalresponse/cpf-reporter/pull/373 Tested and it seems to work locally.