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

fix: run migrations after tenant creation #506

Merged
merged 1 commit into from
Jun 24, 2024

Conversation

fenos
Copy link
Contributor

@fenos fenos commented Jun 21, 2024

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

When a tenant is being created, we first try to run the migrations and then register the target.
This sometimes causes the tenant to never be added if the database is not currently reachable

What is the new behavior?

Migrations are now run after the tenant creation.
If an error occur during the migrations, we schedule a job to re-run async with a queue job

@fenos fenos force-pushed the fix/run-migrations-after-tenant-creation branch from 0429dfe to 3c50325 Compare June 21, 2024 11:48
@coveralls
Copy link

coveralls commented Jun 21, 2024

Pull Request Test Coverage Report for Build 9613107917

Details

  • 43 of 71 (60.56%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.1%) to 79.991%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/http/routes/admin/tenants.ts 39 45 86.67%
src/database/migrations/progressive.ts 3 25 12.0%
Totals Coverage Status
Change from base Build 9599909969: -0.1%
Covered Lines: 12708
Relevant Lines: 15741

💛 - Coveralls

@fenos fenos force-pushed the fix/run-migrations-after-tenant-creation branch from 3c50325 to 089daf1 Compare June 21, 2024 12:01
@coveralls
Copy link

coveralls commented Jun 21, 2024

Pull Request Test Coverage Report for Build 9613241131

Details

  • 43 of 71 (60.56%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.1%) to 79.991%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/http/routes/admin/tenants.ts 39 45 86.67%
src/database/migrations/progressive.ts 3 25 12.0%
Totals Coverage Status
Change from base Build 9599909969: -0.1%
Covered Lines: 12708
Relevant Lines: 15741

💛 - Coveralls

@fenos fenos force-pushed the fix/run-migrations-after-tenant-creation branch from 089daf1 to 57460bf Compare June 21, 2024 14:01
@coveralls
Copy link

coveralls commented Jun 21, 2024

Pull Request Test Coverage Report for Build 9614873221

Details

  • 43 of 71 (60.56%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.1%) to 79.979%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/http/routes/admin/tenants.ts 39 45 86.67%
src/database/migrations/progressive.ts 3 25 12.0%
Totals Coverage Status
Change from base Build 9614828971: -0.1%
Covered Lines: 12710
Relevant Lines: 15746

💛 - Coveralls

@fenos fenos merged commit fe64a3a into master Jun 24, 2024
1 check passed
@fenos fenos deleted the fix/run-migrations-after-tenant-creation branch June 24, 2024 10:48
Copy link

🎉 This PR is included in version 1.6.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants