2023-08-31 18:00:51 -05:00
|
|
|
|
using System;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
|
|
|
|
|
|
#nullable disable
|
|
|
|
|
|
2023-09-22 10:52:17 -05:00
|
|
|
|
namespace DamageAssesment.Api.DocuLinks.Migrations
|
2023-08-31 18:00:51 -05:00
|
|
|
|
{
|
|
|
|
|
/// <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");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|