1
0
mirror of https://github.com/bitwarden/server synced 2025-12-28 22:23:30 +00:00

Document database projects and complete EDD support (#5855)

* Document database projects and complete EDD support

* Remove an old remnant of a now-unused 'future' state

* Sync finalization scripts

* Fix conflict

* Fix some script issues
This commit is contained in:
Matt Bishop
2025-07-21 16:43:30 -04:00
committed by GitHub
parent 3024576181
commit bdadf2af01
12 changed files with 101 additions and 36 deletions

View File

@@ -3,6 +3,7 @@
<ItemGroup>
<EmbeddedResource Include="DbScripts\**\*.sql" />
<EmbeddedResource Include="DbScripts_transition\**\*.sql" />
<EmbeddedResource Include="DbScripts_finalization\**\*.sql" />
</ItemGroup>
<ItemGroup>

View File

@@ -4,5 +4,5 @@ public static class MigratorConstants
{
public const string SqlTableJournalName = "Migration";
public const string DefaultMigrationsFolderName = "DbScripts";
public const string TransitionMigrationsFolderName = "DbScripts_data_migration";
public const string TransitionMigrationsFolderName = "DbScripts_transition";
}

7
util/Migrator/README.md Normal file
View File

@@ -0,0 +1,7 @@
# Bitwarden Database Migrator
A class library leveraged by [utilities](../MsSqlMigratorUtility) and [hosted applications](/src/Admin/HostedServices/DatabaseMigrationHostedService.cs) to perform SQL database migrations. A [MSSQL migrator](./SqlServerDbMigrator.cs) exists here as the default use case.
In production environments the Migrator is typically executed during application startup or as part of CI/CD pipelines to ensure database schemas are up-to-date before application deployment.
See the [documentation on creating migrations](https://contributing.bitwarden.com/contributing/database-migrations/) for how to utilize the files seen here.