Changing to database schema to ensure separations of concerns instead of connection string

This commit is contained in:
Jonathan Bourdon
2024-07-06 23:12:39 -04:00
parent ca94dba08d
commit f6a434c440
12 changed files with 211 additions and 12 deletions

View File

@@ -0,0 +1,31 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Hutopy.Web.Contents.Migrations
{
/// <inheritdoc />
public partial class ChangingContentDefaultSchema : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.EnsureSchema(
name: "Content");
migrationBuilder.RenameTable(
name: "Contents",
newName: "Contents",
newSchema: "Content");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameTable(
name: "Contents",
schema: "Content",
newName: "Contents");
}
}
}