Closed R2ZER0 closed 8 months ago
It looks like the tests are failing, because the new indexes rely on the btree_gin
^1 postgres extension. Django tries to create it, but only superusers can create the extension: https://github.com/ThreeSixtyGiving/datastore/actions/runs/8333672434/job/22805632982?pr=198
I guess we'll have to check that we're happy to use it, and then enable the extension in salt config.
I tried fixing the tests by manually installing the extension into the 360givingdatastore test db w/ psql, but Django creates it's own temporary database to run the tests in instead. The only feasibly way I could think of to fix it then was to give the test user superuser so Django can create the extension itsself.
This PR creates database indexes on the new Grant convenience fields to finish the work of improving API GrantMadeView and GrantReceivedView performance.