-
Notifications
You must be signed in to change notification settings - Fork 9
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
SIMSBIOHUB-665: Habitat Features Database Schema #1483
base: dev
Are you sure you want to change the base?
Conversation
Openshift URLs for the PR Deployment: |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #1483 +/- ##
==========================================
- Coverage 47.74% 47.58% -0.16%
==========================================
Files 935 928 -7
Lines 25844 24188 -1656
Branches 3978 3609 -369
==========================================
- Hits 12340 11511 -829
+ Misses 12848 12043 -805
+ Partials 656 634 -22 ☔ View full report in Codecov by Sentry. |
- Fix/update environment table foreign keys/indexes. - Rename environment_unit database enum. - Update api/app references to database enums.
644a388
to
5c17785
Compare
* | ||
* @description Data type for `alert_severity`. | ||
*/ | ||
export const AlertSeverity = z.enum(['info', 'warning', 'error', 'success']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Should we export the actual enum instead of the type? Would this be more useful?
Then at least downstream we would be able to reference it
export enum AlertSeverity {
info = 'info',
warning = 'warning',
...
}
export const AlertSeverityUnit = z.nativeEnum(AlertSeverity)
|
Links to Jira Tickets
https://apps.nrs.gov.bc.ca/int/jira/browse/SIMSBIOHUB-665
Description of Changes
Initial Habitat Features database schema.
Bonus:
environment_qualitative
andenvironment_qualitative_option
name
column inenvironment_qualitative
andenvironment_quantitative
environment_unit
toquantitative_unit
quantitative_unit
alert_severity
Testing Notes
Database migrations run as expected.
Has appropriate constraints, indexes, etc.
TODO
Table
survey_habitat_feature
If we do add
survey_sample_period_id
andsurvey_observation_id
, should we restrict it to only one of them, since having both would be redundant?