server icon indicating copy to clipboard operation
server copied to clipboard

[SM-109] Proposal: Automate Local Development EF Database Migrations

Open Thomas-Avery opened this issue 2 years ago • 0 comments

Type of change

- [ ] Bug fix
- [X] New feature development
- [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc)
- [ ] Build/deploy pipeline (DevOps)
- [ ] Other

Objective

This proposal is to suggest a method for a similar local developer user experience for Entity Framework database provider migrations.

This code change proposal goes along with the contributing documentation proposal https://github.com/bitwarden/contributing-docs/pull/36

Code changes

  • dev/migrate.ps1

Add optional command line switches for running other database provider migrations.

Entity Framework database providers are migrated by the dotnet ef database update command

Before you submit

  • Please check for formatting errors (dotnet format --verify-no-changes) (required)
  • If making database changes - make sure you also update Entity Framework queries and/or migrations
  • Please add unit tests where it makes sense to do so (encouraged but not required)
  • If this change requires a documentation update - notify the documentation team
  • If this change has particular deployment requirements - notify the DevOps team

Thomas-Avery avatar Sep 09 '22 22:09 Thomas-Avery