Files
survey-beta/survey-beta/Migrations/20250131192348_AddFullnameToUser.cs
majed adel d2a32d35f4 Feat/Controllers
Added- AnalyticsController ResponsesController SurveyController UserController
2025-02-01 14:06:32 -08:00

78 lines
2.3 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace survey_beta.Migrations
{
/// <inheritdoc />
public partial class AddFullnameToUser : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "UserName",
table: "AspNetUsers");
migrationBuilder.RenameColumn(
name: "Username",
table: "AspNetUsers",
newName: "UserName");
migrationBuilder.AlterColumn<string>(
name: "UserName",
table: "AspNetUsers",
type: "character varying(256)",
maxLength: 256,
nullable: true,
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "Fullname",
table: "AspNetUsers",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "UserName",
table: "AspNetUsers",
newName: "Username");
migrationBuilder.AlterColumn<string>(
name: "Username",
table: "AspNetUsers",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(256)",
oldMaxLength: 256,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "Fullname",
table: "AspNetUsers",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AddColumn<string>(
name: "UserName",
table: "AspNetUsers",
type: "character varying(256)",
maxLength: 256,
nullable: true);
}
}
}