Skip to content

Add db migration existence check#4156

Merged
ildyria merged 1 commit intomasterfrom
db-migration-check
Mar 8, 2026
Merged

Add db migration existence check#4156
ildyria merged 1 commit intomasterfrom
db-migration-check

Conversation

@ildyria
Copy link
Member

@ildyria ildyria commented Mar 8, 2026

Fixes #4152

Summary by CodeRabbit

  • Chores
    • Enhanced database initialization robustness with a pre-flight validation check to ensure required migration files are present. The system now prevents incomplete database setup by validating migration requirements before proceeding with standard connection checks.

@ildyria ildyria requested a review from a team as a code owner March 8, 2026 13:19
@coderabbitai
Copy link

coderabbitai bot commented Mar 8, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e87f678a-d514-45ee-a6a6-6409cfa24572

📥 Commits

Reviewing files that changed from the base of the PR and between a51f487 and 04775ec.

📒 Files selected for processing (1)
  • docker/scripts/03-db-check.sh

📝 Walkthrough

Walkthrough

A pre-flight validation check is added to docker/scripts/03-db-check.sh to verify that the migrations directory exists and contains files before proceeding with database connection checks. The script exits with an error if the directory is missing or empty, preserving all existing database readiness logic.

Changes

Cohort / File(s) Summary
Database Migration Pre-flight Check
docker/scripts/03-db-check.sh
Adds validation to verify database/migrations directory exists and is non-empty; exits with error status 1 if check fails; preserves existing MySQL/PostgreSQL connection wait logic.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A check before the migrations run,
Does ensure the path is there, not gone,
The database waits with patient care,
While rabbit verifies each file with flair! 🚀

🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ildyria ildyria merged commit 57c748f into master Mar 8, 2026
45 checks passed
@ildyria ildyria deleted the db-migration-check branch March 8, 2026 14:06
@ildyria ildyria changed the title Add db migration existance check Add db migration existence check Mar 8, 2026
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.

1 participant