mirror of
https://github.com/bitwarden/server
synced 2025-12-06 00:03:34 +00:00
[BRE-1018] improve database test error messaging (#6103)
* improve database test error messaging * removing repetitive logic
This commit is contained in:
22
.github/workflows/test-database.yml
vendored
22
.github/workflows/test-database.yml
vendored
@@ -229,11 +229,27 @@ jobs:
|
||||
- name: Validate XML
|
||||
run: |
|
||||
if grep -q "<Operations>" "report.xml"; then
|
||||
echo
|
||||
echo "Migration files are not in sync with the files in the Sql project. Review to make sure that any stored procedures / other db changes match with the stored procedures in the Sql project."
|
||||
echo "ERROR: Migration files are not in sync with the SQL project"
|
||||
echo ""
|
||||
echo "Check these locations:"
|
||||
echo " - Migration scripts: util/Migrator/DbScripts/"
|
||||
echo " - SQL project files: src/Sql/"
|
||||
echo " - Download 'report.xml' artifact for full details"
|
||||
echo ""
|
||||
|
||||
# Show actual SQL differences - exclude database setup commands
|
||||
if [ -s "diff.sql" ]; then
|
||||
echo "Key SQL differences:"
|
||||
# Show meaningful schema differences, filtering out database setup noise
|
||||
grep -E "^(CREATE|DROP|ALTER)" diff.sql | grep -v "ALTER DATABASE" | grep -v "DatabaseName" | head -5
|
||||
echo ""
|
||||
fi
|
||||
|
||||
echo "Common causes: naming differences (underscores, case), missing objects, or definition mismatches"
|
||||
|
||||
exit 1
|
||||
else
|
||||
echo "Report looks good"
|
||||
echo "SUCCESS: Database validation passed"
|
||||
fi
|
||||
shell: bash
|
||||
|
||||
|
||||
Reference in New Issue
Block a user