DamageAssessment_Backend/DamageAssesmentApi/DamageAssesment.Api.DocuLinks/Migrations/20230828165655_InitialDocumentCreate.cs
2023-09-22 11:56:09 -04:00

61 lines
2.4 KiB
C#

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