[Issue 698] Add rest of opportunity table columns #863
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #698
Time to review: 5 mins
Changes proposed
Add the rest of the columns from the existing
topportunity
table to our schemaUpdate the corresponding factory
Context for reviewers
We were only missing a few. Note that there are 3 columns I have deliberately not ported over as they aren't used by the existing system (two explicitly say that in the docs, Narmada confirmed that
listed
was always the same).While I was doing this, added some indexes to the table for columns that we query by.
I didn't add every new column to the factory as some of them we won't really use anytime soon like the user/profile IDs.
I don't think most of these fields will be in the response from the API at the moment, but a few like category explanation should be added - we can do that in a later ticket.
Additional information
Migrations run uneventfully locally. Can migrate up and down.
Able to run the
make db-seed-local
script uneventfully and get data in the DB: