Add new migration
This commit is contained in:
@ -0,0 +1,65 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
namespace Hcs.WebApp.Data.Hcs.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class UpdateFileToParseEntity : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Path",
|
||||
table: "FilesToParse",
|
||||
type: "nvarchar(max)",
|
||||
nullable: false,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "FileName",
|
||||
table: "FilesToParse",
|
||||
type: "nvarchar(max)",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "UploadedAt",
|
||||
table: "FilesToParse",
|
||||
type: "datetime2",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "UploaderId",
|
||||
table: "FilesToParse",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "FileName",
|
||||
table: "FilesToParse");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "UploadedAt",
|
||||
table: "FilesToParse");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "UploaderId",
|
||||
table: "FilesToParse");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "Path",
|
||||
table: "FilesToParse",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(max)");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user