forked from ddrilling/AsbCloudServer
50 lines
1.6 KiB
C#
50 lines
1.6 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace AsbCloudDb.Migrations
|
|
{
|
|
public partial class UserSettings_rename_idUser : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_t_user_settings_t_user_idUser",
|
|
table: "t_user_settings");
|
|
|
|
migrationBuilder.RenameColumn(
|
|
name: "idUser",
|
|
table: "t_user_settings",
|
|
newName: "id_user");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_t_user_settings_t_user_id_user",
|
|
table: "t_user_settings",
|
|
column: "id_user",
|
|
principalTable: "t_user",
|
|
principalColumn: "id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_t_user_settings_t_user_id_user",
|
|
table: "t_user_settings");
|
|
|
|
migrationBuilder.RenameColumn(
|
|
name: "id_user",
|
|
table: "t_user_settings",
|
|
newName: "idUser");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_t_user_settings_t_user_idUser",
|
|
table: "t_user_settings",
|
|
column: "idUser",
|
|
principalTable: "t_user",
|
|
principalColumn: "id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
}
|
|
}
|
|
}
|