impactoss / impactoss-server

IMPACT OSS - server-side application & API
https://demo.impactoss.org
MIT License
3 stars 8 forks source link

Delete sdgtarget features from NZ Justice variant #421

Open lukearndt opened 1 month ago

lukearndt commented 1 month ago

Context

https://github.com/impactoss/impactoss-server/issues/363

We don't need the SDG Target features in the NZ Justice version of ImpactOSS so we want to delete them from it.

Changes

This commit deletes the SDG Target features from the application. This includes the following tables and all of their corresponding associations, controllers, factories, models, policies, routes, serializers, and specs:

It does not delete the groups_sdgtargets_default field from the Taxonomy model.

Considerations

The database migration that removes the tables is reversible, with the following caveats:

  1. It recreates the dropped tables using the statements in schema.rb, which were taken from the version in nz-justice-development at the time of this commit. Right now, there aren't any pending PRs that alter those table definitions so they should be correct, but that could change between the creation and merging of this PR.

  2. Rolling back the migration will restore the tables, but it will not restore any of their previous data. That data will only be recoverable if we take and retain a database backup prior to deploying this change.