using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace DamageAssesment.Api.DocuLinks.Migrations { /// public partial class DocumentTranslation : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( name: "description", table: "Documents"); migrationBuilder.DropColumn( name: "title", table: "Documents"); migrationBuilder.AddColumn( name: "IsAttachment", table: "LinkTypes", type: "bit", nullable: false, defaultValue: false); migrationBuilder.CreateTable( name: "DocumentsTranslations", columns: table => new { Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), DocumentId = table.Column(type: "int", nullable: false), title = table.Column(type: "nvarchar(max)", nullable: false), description = table.Column(type: "nvarchar(max)", nullable: false), Language = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_DocumentsTranslations", x => x.Id); }); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "DocumentsTranslations"); migrationBuilder.DropColumn( name: "IsAttachment", table: "LinkTypes"); migrationBuilder.AddColumn( name: "description", table: "Documents", type: "nvarchar(max)", nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "title", table: "Documents", type: "nvarchar(max)", nullable: false, defaultValue: ""); } } }