1
0
mirror of https://github.com/bitwarden/server synced 2026-01-27 14:53:21 +00:00
Files
server/dev
mkincaid-bw 51d90cce3d Add Entity Framework migration validation to verify_migrations script (#6817)
* Add Entity Framework migration validation to verify_migrations script

Enhances dev/verify_migrations.ps1 to validate EF migration files in addition to SQL migrations. The script now validates migrations in util/MySqlMigrations, util/PostgresMigrations, and util/SqliteMigrations directories.

Validation includes:
- Correct naming format (YYYYMMDDHHMMSS_Description.cs)
- Both .cs and .Designer.cs files exist as pairs
- Chronological ordering of timestamps
- Excludes DatabaseContextModelSnapshot.cs files

The script provides comprehensive reporting for all migration types with a summary showing which validations passed or failed.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* Fix: Validate all EF migration files instead of silently ignoring malformed names

Previously, migration files that didn't match the expected pattern were silently
ignored during validation. This could allow incorrectly named files to slip through.

Now the script explicitly tracks and reports any migration files that don't match
the required YYYYMMDDHHMMSS_Description.cs format, ensuring all new migration files
are properly validated.

Addresses feedback from PR review to prevent malformed migration files from being
overlooked.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-15 13:43:23 -08:00
..
2025-06-05 12:23:01 -06:00