ThreeSixtyGiving / datastore

A Data Store application for 360Giving
GNU Affero General Public License v3.0
0 stars 1 forks source link

api: Grant Indexes #198

Closed R2ZER0 closed 5 months ago

R2ZER0 commented 5 months ago

This PR creates database indexes on the new Grant convenience fields to finish the work of improving API GrantMadeView and GrantReceivedView performance.

R2ZER0 commented 5 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.

R2ZER0 commented 5 months ago

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.