fix: Standardize EF Core migrations table names for consistency
- Rename EmailApiDbContext MigrationTableName from '_EmailApiMigrations' to '_Migrations' - Rename MyAiDbContext MigrationTableName from '_MyAiMigrations' to '_Migrations' - Add migrations to rename tables in database: emailApi._EmailApiMigrations → emailApi._Migrations, myAi._MyAiMigrations → myAi._Migrations - Aligns with naming convention used in other schemas (cvMatcher, cvSearch, rag) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace MyAi.Data.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class RenameEFMigrationsTable : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
// Rename the EF Core migrations history table to match naming convention
|
||||
migrationBuilder.Sql("EXEC sp_rename '[myAi].[_MyAiMigrations]', '_Migrations'");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
// Revert the rename
|
||||
migrationBuilder.Sql("EXEC sp_rename '[myAi].[_Migrations]', '_MyAiMigrations'");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user