Skip to content
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

Feature/api/marxan 196 migrate for bbox #199

Merged
merged 6 commits into from
May 24, 2021

Conversation

aagm
Copy link
Member

@aagm aagm commented May 19, 2021

Substitute this line for a meaningful title for your changes

Overview

Please write a description. If the PR is hard to understand, provide a quick explanation of the code.

Designs

Link to the related design prototypes (if applicable)

Testing instructions

Please explain how to test the PR: ID of a dataset, steps to reach the feature, etc.

Feature relevant tickets

Link to the related task manager tickets


Checklist before submitting

  • Meaningful commits and code rebased on develop.
  • If this PR adds feature that should be tested for regressions when
    deploying to staging/production, please add brief testing instructions
    to the deploy checklist (docs/deployment-checklist.md)
  • Update CHANGELOG file

@vercel
Copy link

vercel bot commented May 19, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

marxan – ./app

🔍 Inspect: https://vercel.com/vizzuality1/marxan/G7eULYuARCxkP3efYurNH6LaQXnL
✅ Preview: https://marxan-git-feature-apimarxan-196-migrate-for-bbox-vizzuality1.vercel.app

marxan-storybook – ./app

🔍 Inspect: https://vercel.com/vizzuality1/marxan-storybook/3qLahK1FPGqBmxCESfF3FUExnLbo
✅ Preview: https://marxan-storybo-git-feature-apimarxan-196-migrate-for-bbo-e82c1a.vercel.app

-----------------------------------------
-- Generates the new column we need
-----------------------------------------
ALTER TABLE admin_regions ADD COLUMN bbox jsonb;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Entity('admin_regions')
export class AdminArea ...

shouldn't it be updated as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That one is entending from the country View, so only defining it in the country should be more than enough

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aagm you don't have to expose it to frontend (i.e. don't put Api decorators) but I believe we should keep the code definitions really close (the same) as they are in the database - it will help with both generating migrations automatically AND keep the usage clean (right now, if you would like to use bbox from within the code - you can't; and in few months one will need to figure out that the column is there by reviewing every single migration where this table is present)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants