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

MB-1422 - Add migrations for orders app. Allow migrations based on env var. #3514

Merged
merged 8 commits into from Feb 13, 2020

Conversation

@chrisgilmerproj
Copy link
Contributor

chrisgilmerproj commented Feb 12, 2020

Description

In this PR:

  • Copy the schema migrations from the MilMove app to the Orders app.
  • Updates all the devlocal faux certificates for each service
  • Creates a local secure migration for each devlocal faux cert with appropriate permissions
  • Add an env var named APPLICATION which allows a person to use all the same Makefile commands for the DB but with Orders migration files.

The migrations should be a direct port of the fizz files to sql with no changes. As far as I can tell the only change may be varchar to text. I did not change the indexes or the timestamps since this is a direct port and I'm not looking to update any code here.

The scope of this ticket does not include any tests for CircleCI. Modifying the test suite will be a future project.

Setup

First add this to your .envrc.local:

export APPLICATION=orders

Then run these commands:

direnv allow
make db_dev_reset db_dev_migrate

Code Review Verification Steps

  • Request review from a member of a different team.
  • Have the Jira acceptance criteria been met for this change?
@chrisgilmerproj chrisgilmerproj self-assigned this Feb 12, 2020
@chrisgilmerproj

This comment has been minimized.

Copy link
Contributor Author

chrisgilmerproj commented Feb 12, 2020

TODO:

  • Also need to ensure local faux certs are represented.
  • Need docs for generating certs and migraitons.
  • Need to update serial numbers for migrations to come after creation of tables.
@chrisgilmerproj chrisgilmerproj marked this pull request as ready for review Feb 12, 2020
@chrisgilmerproj chrisgilmerproj requested review from lynzt, gidjin, chrisrcoles, garrettqmartin8, reggieriser, Ryan-Koch, tinyels and transcom/truss-infra Feb 12, 2020
Copy link
Contributor

rdhariwal left a comment

Migrations ran successfully for me locally :shipit:

@chrisgilmerproj chrisgilmerproj merged commit 03aca95 into master Feb 13, 2020
15 checks passed
15 checks passed
ci/circleci: acceptance_tests_experimental Your tests passed on CircleCI!
Details
ci/circleci: acceptance_tests_local Your tests passed on CircleCI!
Details
ci/circleci: acceptance_tests_staging Your tests passed on CircleCI!
Details
ci/circleci: build_app Your tests passed on CircleCI!
Details
ci/circleci: build_migrations Your tests passed on CircleCI!
Details
ci/circleci: build_storybook_app Your tests passed on CircleCI!
Details
ci/circleci: build_tasks Your tests passed on CircleCI!
Details
ci/circleci: build_tools Your tests passed on CircleCI!
Details
ci/circleci: check_generated_code Your tests passed on CircleCI!
Details
ci/circleci: client_test Your tests passed on CircleCI!
Details
ci/circleci: integration_tests Your tests passed on CircleCI!
Details
ci/circleci: pre_deps_golang Your tests passed on CircleCI!
Details
ci/circleci: pre_deps_yarn Your tests passed on CircleCI!
Details
ci/circleci: pre_test Your tests passed on CircleCI!
Details
ci/circleci: server_test Your tests passed on CircleCI!
Details
@chrisgilmerproj chrisgilmerproj deleted the cg_orders_migrations branch Feb 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.