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

[#91] Fix: Move database migration right after the database initializing #94

Merged
merged 5 commits into from
Mar 28, 2023

Conversation

carryall
Copy link
Collaborator

@carryall carryall commented Feb 16, 2023

Resolve #91

What happened 👀

Move the database migration right after the database is initialized, just like we did in Varun API project

Insight 📝

N/A

Proof Of Work 📹

All test passed

@carryall carryall self-assigned this Feb 16, 2023
@carryall carryall marked this pull request as ready for review February 21, 2023 09:40
@carryall carryall requested a review from a team as a code owner March 7, 2023 08:24
Copy link
Contributor

@hoangmirs hoangmirs left a comment

Choose a reason for hiding this comment

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

LGTM with a small suggestion

Comment on lines +61 to +66
return fmt.Sprintf("postgres://%s:%s@%s:%s/%s?sslmode=disable",
viper.GetString("db_username"),
viper.GetString("db_password"),
viper.GetString("db_host"),
helpers.GetStringConfig("db_port"),
helpers.GetStringConfig("db_name"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we take this chance to drop the use of config/app.toml file? And change to use .env files instead.
With that file, we will get confused when adding new environment variables, as we don't know where we should put them

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

As this PR is opened for so long, let's do it in another PR. I've created an issue to do it 🙇🏼

@carryall carryall merged commit 256b454 into develop Mar 28, 2023
@carryall carryall deleted the bug/gh-91-move-db-migration-after-db-init branch March 28, 2023 02:54
@carryall carryall changed the title Fix: Move database migration right after the database initializing [#91] Fix: Move database migration right after the database initializing Apr 24, 2023
@carryall carryall added this to the 2.1.0 milestone Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix: Move database migration right after the database initializing
4 participants