Skip to content

Commit

Permalink
[AC-1360] Added EF migration scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
r-tome committed Aug 3, 2023
1 parent 4b47d25 commit a4ea5c4
Show file tree
Hide file tree
Showing 12 changed files with 6,777 additions and 3 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -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");
}
}
2 changes: 1 addition & 1 deletion util/MySqlMigrations/MySqlMigrations.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Loading

0 comments on commit a4ea5c4

Please sign in to comment.