Changing to database schema to ensure separations of concerns instead of connection string
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Hutopy.Web.Messages.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class ChangingMessagingDefaultSchema : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.EnsureSchema(
|
||||
name: "Messaging");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "Messages",
|
||||
newName: "Messages",
|
||||
newSchema: "Messaging");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "ContentId",
|
||||
schema: "Messaging",
|
||||
table: "Messages",
|
||||
newName: "SubjectId");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.RenameTable(
|
||||
name: "Messages",
|
||||
schema: "Messaging",
|
||||
newName: "Messages");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "SubjectId",
|
||||
table: "Messages",
|
||||
newName: "ContentId");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user