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

Int b 21509 db add poe and pod #14057

Open
wants to merge 15 commits into
base: integrationTesting
Choose a base branch
from

Conversation

msaki-caci
Copy link
Contributor

B-21509

Summary

We are adding the ports and port_location tables to the database along with adding the Port of Debarkation (POD) and Port of Embarkation (POE) columns to mto_service_items.

Also added tests for ports and port_location and updated mto_service_items tests.

Verification Steps for the Author

These are to be checked by the author.

  • Tested in the Experimental environment (for changes to containers, app startup, or connection to data stores)
  • Have the Agility acceptance criteria been met for this change?

Verification Steps for Reviewers

These are to be checked by a reviewer.

  • Has the branch been pulled in and checked out?
  • Have the BL acceptance criteria been met for this change?
  • Was the CircleCI build successful?
  • Has the code been reviewed from a standards and best practices point of view?

Setup to Run the Code

How to test

  1. Run the migrations:
    • I ran mine using make db_dev_reset db_dev_migrate, though the reset might not be necessary.
    • You could also run make server_test
  2. Verify that the tables and new columns have been added.
    • I verified mine using DBeaver.

Database

Any new migrations/schema changes:

Create ports and port_location tables
Make go models for port and port_location
Add migrations to the migration_manifest
Remove POD/POE columns from mto_service_items
Update sql queries
Update models for mto_service_items
Fix POE and POD Location in structs
Change 'belongs_to:ports' to 'belongs_to:port'
Add tests for port and port location
Update mto_service_items_test to include POD and POE
Remove redundant 'unique' query
Add comments for new mto_service_items columns
string(PortTypeB),
}

type Port struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

These should be marked as read only and add ports to db_truncate script. This will be static data and we will send back an error if Prime sends us port codes that are not in this table.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Marked the columns for read only and added ports to the db_truncate in bf6e2f9

Add ports to db-truncate script
Mark the columns under Port to 'read only'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
database Go-Rillaz Go-Rillaz INTEGRATION Slated for Integration Testing
Development

Successfully merging this pull request may close these issues.

2 participants