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

Create test database migrations #22

Merged
merged 11 commits into from
Nov 9, 2022
Merged

Conversation

Jozzey
Copy link
Contributor

@Jozzey Jozzey commented Nov 8, 2022

https://eaflood.atlassian.net/browse/WATER-3787

Some migrations scripts are required to create the tables/data for the unit tests in this PR #15 in order for the build process to pass.

As no migrations process had yet been set up on this application. This PR has been created to build the migrations process as well as populate the test database with the data required for the PR mentioned above.

This migration process has been based on that used by the Charging Module.

https://eaflood.atlassian.net/browse/WATER-3787

Some migrations scripts are required to create the tables/data for the tests
@Jozzey Jozzey added the enhancement New feature or request label Nov 8, 2022
@Jozzey Jozzey marked this pull request as ready for review November 8, 2022 17:03
Copy link
Member

@Cruikshanks Cruikshanks left a comment

Choose a reason for hiding this comment

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

I think it might benefit from some changes around the comments.

The one thing we do need to ensure is that the files include use strict.

But look at us, we have migrations now!

config/database.config.js Show resolved Hide resolved
db/migrations/20221108143943_create-water-schema.js Outdated Show resolved Hide resolved
db/migrations/20221108152353_create-charge-versions.js Outdated Show resolved Hide resolved
db/migrations/20221108152353_create-charge-versions.js Outdated Show resolved Hide resolved
Jozzey and others added 5 commits November 9, 2022 09:41
Added comment to explain why dotenv has been required here

Co-authored-by: Alan Cruikshanks <[email protected]>
Co-authored-by: Alan Cruikshanks <[email protected]>
Co-authored-by: Alan Cruikshanks <[email protected]>
Co-authored-by: Alan Cruikshanks <[email protected]>
@Jozzey Jozzey requested a review from Cruikshanks November 9, 2022 09:51
@Jozzey Jozzey merged commit f8b2d0f into main Nov 9, 2022
@Jozzey Jozzey deleted the create-test-database-migrations branch November 9, 2022 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants