using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace DamageAssesment.Api.DocuLinks.Migrations { /// public partial class InitialDocumentCreate : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Documents", columns: table => new { Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), title = table.Column(type: "nvarchar(max)", nullable: false), linkTypeId = table.Column(type: "int", nullable: false), description = table.Column(type: "nvarchar(max)", nullable: false), docName = table.Column(type: "nvarchar(max)", nullable: false), url = table.Column(type: "nvarchar(max)", nullable: false), Path = table.Column(type: "nvarchar(max)", nullable: false), IsActive = table.Column(type: "bit", nullable: false), dateCreated = table.Column(type: "datetime2", nullable: false), dateUpdated = table.Column(type: "datetime2", nullable: false) }, constraints: table => { table.PrimaryKey("PK_Documents", x => x.Id); }); migrationBuilder.CreateTable( name: "LinkTypes", columns: table => new { Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), TypeText = table.Column(type: "nvarchar(max)", nullable: false), IsActive = table.Column(type: "bit", nullable: false) }, constraints: table => { table.PrimaryKey("PK_LinkTypes", x => x.Id); }); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Documents"); migrationBuilder.DropTable( name: "LinkTypes"); } } }