mirror of
https://github.com/bitwarden/server.git
synced 2025-01-10 20:07:56 +01:00
[AC-1360] Added EF migration scripts
This commit is contained in:
parent
4b47d25755
commit
a4ea5c4dca
2231
util/MySqlMigrations/Migrations/20230803195421_PopulateResellerNames.Designer.cs
generated
Normal file
2231
util/MySqlMigrations/Migrations/20230803195421_PopulateResellerNames.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,24 @@
|
||||
using Bit.Core.Utilities;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Bit.MySqlMigrations.Migrations;
|
||||
|
||||
/// <inheritdoc />
|
||||
public partial class PopulateResellerNames : Migration
|
||||
{
|
||||
private const string _scriptLocation = "MySqlMigrations.HelperScripts.2023-08-03_00_PopulateResellerNames.sql";
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.Sql(CoreHelpers.GetEmbeddedResourceContentsAsync(_scriptLocation));
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
throw new Exception("Irreversible migration");
|
||||
}
|
||||
}
|
@ -29,6 +29,6 @@
|
||||
<EmbeddedResource Include="HelperScripts\2021-10-21_00_SetMaxAutoscaleSeatCount.sql" />
|
||||
<EmbeddedResource Include="HelperScripts\2022-03-01_00_Up_MigrateOrganizationApiKeys.sql" />
|
||||
<EmbeddedResource Include="HelperScripts\2022-03-01_00_Down_MigrateOrganizationApiKeys.sql" />
|
||||
<EmbeddedResource Include="Scripts\2023-08-03_00_PopulateResellerNames.sql" />
|
||||
<EmbeddedResource Include="HelperScripts\2023-08-03_00_PopulateResellerNames.sql" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
2242
util/PostgresMigrations/Migrations/20230803195417_PopulateResellerNames.Designer.cs
generated
Normal file
2242
util/PostgresMigrations/Migrations/20230803195417_PopulateResellerNames.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,24 @@
|
||||
using Bit.Core.Utilities;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Bit.PostgresMigrations.Migrations;
|
||||
|
||||
/// <inheritdoc />
|
||||
public partial class PopulateResellerNames : Migration
|
||||
{
|
||||
private const string _scriptLocation = "PostgresMigrations.HelperScripts.2023-08-03_00_PopulateResellerNames.psql";
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.Sql(CoreHelpers.GetEmbeddedResourceContentsAsync(_scriptLocation));
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
throw new Exception("Irreversible migration");
|
||||
}
|
||||
}
|
@ -24,6 +24,6 @@
|
||||
<EmbeddedResource Include="HelperScripts\2021-10-21_00_SetMaxAutoscaleSeatCount.psql" />
|
||||
<EmbeddedResource Include="HelperScripts\2022-03-01_00_Up_MigrateOrganizationApiKeys.psql" />
|
||||
<EmbeddedResource Include="HelperScripts\2022-03-01_00_Down_MigrateOrganizationApiKeys.psql" />
|
||||
<EmbeddedResource Include="Scripts\2023-08-03_00_PopulateResellerNames.sql" />
|
||||
<EmbeddedResource Include="HelperScripts\2023-08-03_00_PopulateResellerNames.psql" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
2229
util/SqliteMigrations/Migrations/20230803195412_PopulateResellerNames.Designer.cs
generated
Normal file
2229
util/SqliteMigrations/Migrations/20230803195412_PopulateResellerNames.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,24 @@
|
||||
using Bit.Core.Utilities;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Bit.SqliteMigrations.Migrations;
|
||||
|
||||
/// <inheritdoc />
|
||||
public partial class PopulateResellerNames : Migration
|
||||
{
|
||||
private const string _scriptLocation = "SqliteMigrations.HelperScripts.2023-08-03_00_PopulateResellerNames.sql";
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.Sql(CoreHelpers.GetEmbeddedResourceContentsAsync(_scriptLocation));
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
throw new Exception("Irreversible migration");
|
||||
}
|
||||
}
|
@ -23,7 +23,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Scripts\2023-08-03_00_PopulateResellerNames.sql" />
|
||||
<EmbeddedResource Include="HelperScripts\2023-08-03_00_PopulateResellerNames.sql" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
Loading…
Reference in New Issue
Block a user