-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Follow+Notes: Add grant notes tables to database #3200
Labels
collaboration
Grant Finder
Issues related to the Grant Finder
javascript
Pull requests that update Javascript code
Comments
27 tasks
5 tasks
thucdtran
added a commit
that referenced
this issue
Jun 23, 2024
Knex documentation says for the unique() function, that useConstraint will use a unique constraint and is default true for postgres when there is no predicate defined. Issue #3200 specifies that we want a unique index. Documentation can be found here: https://knexjs.org/guide/schema-builder.html#unique
thucdtran
added a commit
that referenced
this issue
Jul 1, 2024
…#3209) * Create migration to add grant_notes and grant_notes_revisions tables * Create migration to add grant_notes and grant_notes_revisions tables * Add useConstraint modifier to the creation of the unique index. Knex documentation says for the unique() function, that useConstraint will use a unique constraint and is default true for postgres when there is no predicate defined. Issue #3200 specifies that we want a unique index. Documentation can be found here: https://knexjs.org/guide/schema-builder.html#unique * Lint
@thucdtran thanks for your work on this! my understanding is that there isn't anything to test on the front-end here for this change - does that sound right to you? if so, ill plan to just do general testing in staging of core workflows before our next release |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
collaboration
Grant Finder
Issues related to the Grant Finder
javascript
Pull requests that update Javascript code
Subtask of [STORY]: Update 'Status' to 'Follow + Note' feature #2960
Blocked by
N/A
Blocks
Definition of Done
A new Knex migration is added that creates the tables needed for storing user-submitted notes about grants.
Implementation Details
This requires the following new tables to be created:
grant_notes
id
: serial, not null, primary keygrant_id
: text, not null, foreign key togrants.grant_id
user_id
: int, not null, foreign key tousers.id
created_at
: timestamp with time zone, not null, defaultnow()
idx_grant_id_user_id
on columns(grant_id, user_id)
grant_notes_revisions
id
: serial, not null, primary keygrant_note_id
: int, not null, foreign key togrant_notes.id
created_at
: timestamp with time zone, not null, defaultnow()
text
: text, not nullThe text was updated successfully, but these errors were encountered: