-
Notifications
You must be signed in to change notification settings - Fork 5
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
output entities migration ready + fake data for outputs #305
Conversation
This pull request is being automatically deployed with Vercel (learn more). marxan – ./app🔍 Inspect: https://vercel.com/vizzuality1/marxan/GgdUwb4cWFTCp9xjQ8V4LxbbzhFN marxan-storybook – ./app🔍 Inspect: https://vercel.com/vizzuality1/marxan-storybook/Cy5hdGiDDUMsmYishcozJbiJgDLV |
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.
- Failing tests
- We shall keep entities definitions (.entity.ts) accurate at least for columns
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.
thanks @aagm, the data parts look ok, though as Kamil noted we need to sync the entities.
ALTER TABLE scenario_features_data | ||
DROP COLUMN target_met; | ||
ALTER TABLE scenario_features_data | ||
ADD COLUMN feature_id SERIAL; |
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.
should we make this also PRIMARY KEY
for simplicity's sake?
Otherwise we should at least enforce uniqueness across (feature_id, scenario_id)
, I think
Also, I suggest to avoid calling this feature_id
as we are already using these something_id
names quite consistently for FKs (or sort of FKs if across dbs) - maybe something like marxan_featureid
?
api/apps/geoprocessing/src/migrations/geoprocessing/1624890503611-marxanOutputEntities.ts
Show resolved
Hide resolved
ADD COLUMN run_id int; | ||
|
||
ALTER TABLE output_scenarios_pu_data | ||
ADD CONSTRAINT value_out_chk CHECK (value = 0 or value = 1); |
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.
do we still need value
to be double precision
if we constrain it to 0 or 1?
Co-authored-by: andrea rota <[email protected]>
f71e729
to
34c7491
Compare
… till solution is found
Migration + fake data for outputs