DamageAssessment_Backend/DamageAssesmentApi/DamageAssesment.Api.Surveys/Migrations/20230927211618_AzureSurveys.cs

57 lines
2.1 KiB
C#
Raw Normal View History

2023-08-18 16:14:41 -05:00
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
2023-09-27 16:18:48 -05:00
namespace DamageAssesment.Api.Surveys.Migrations
2023-08-18 16:14:41 -05:00
{
/// <inheritdoc />
2023-09-27 16:18:48 -05:00
public partial class AzureSurveys : Migration
2023-08-18 16:14:41 -05:00
{
/// <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),
2023-09-27 16:18:48 -05:00
StartDate = table.Column<DateTime>(type: "datetime2", nullable: false),
EndDate = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatedDate = table.Column<DateTime>(type: "datetime2", nullable: false)
2023-08-18 16:14:41 -05:00
},
constraints: table =>
{
table.PrimaryKey("PK_Surveys", x => x.Id);
});
2023-09-27 16:18:48 -05:00
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);
});
2023-08-18 16:14:41 -05:00
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Surveys");
2023-09-27 16:18:48 -05:00
migrationBuilder.DropTable(
name: "SurveysTranslation");
2023-08-18 16:14:41 -05:00
}
}
}