DamageAssessment_Backend/DamageAssesmentApi/DamageAssesment.Api.Surveys/Migrations/20230927211618_AzureSurveys.cs
2023-09-27 17:18:48 -04:00

57 lines
2.1 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace DamageAssesment.Api.Surveys.Migrations
{
/// <inheritdoc />
public partial class AzureSurveys : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Surveys",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
IsEnabled = table.Column<bool>(type: "bit", nullable: false),
StartDate = table.Column<DateTime>(type: "datetime2", nullable: false),
EndDate = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatedDate = table.Column<DateTime>(type: "datetime2", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Surveys", x => x.Id);
});
migrationBuilder.CreateTable(
name: "SurveysTranslation",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
SurveyId = table.Column<int>(type: "int", nullable: false),
Title = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
Language = table.Column<string>(type: "nvarchar(max)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_SurveysTranslation", x => x.Id);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Surveys");
migrationBuilder.DropTable(
name: "SurveysTranslation");
}
}
}