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

Init PostgresDatabaseModule on startup #2009

Merged
merged 3 commits into from
Oct 16, 2024

Conversation

hectorgomezv
Copy link
Member

Summary

This PR adds PostgresDatabaseModule to the application's startup. This implies the database connection would be initialized regardless of whether any db-related feature is active.

Note: database migrations would not run if RUN_MIGRATIONS is false.

Changes

  • Add PostgresDatabaseModule to the imports array of AppModule.
  • Adds a new dummy TestPostgresDatabaseModule to be used on controller tests.
  • Overrides PostgresDatabaseModule with TestPostgresDatabaseModule on controller tests.

@hectorgomezv hectorgomezv self-assigned this Oct 11, 2024
@hectorgomezv hectorgomezv requested a review from a team as a code owner October 11, 2024 12:47
@hectorgomezv hectorgomezv marked this pull request as draft October 11, 2024 12:52
@hectorgomezv hectorgomezv marked this pull request as ready for review October 11, 2024 13:07
@hectorgomezv hectorgomezv merged commit 609894e into main Oct 16, 2024
18 checks passed
@hectorgomezv hectorgomezv deleted the init-postgres-database-module-on-startup branch October 16, 2024 14:20
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.

2 participants