gehgassi_backend/gehGassi.Persistence/Migrations/20221022130121_PublicWalkResponsesAdded.cs

49 lines
2.3 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace gehGassi.Persistence.Migrations
{
public partial class PublicWalkResponsesAdded : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "PublicWalkResponses",
columns: table => new
{
Id = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
PublicWalkRequestId = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
DogWalkerId = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
Price = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
Info = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
Answer = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
Status = table.Column<int>(type: "int", nullable: false),
CancellationReason = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
Created = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: false),
Index = table.Column<long>(type: "bigint", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Version = table.Column<byte[]>(type: "rowversion", rowVersion: true, nullable: true),
UpdatedAt = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: false),
Deleted = table.Column<bool>(type: "bit", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_PublicWalkResponses", x => x.Id);
});
migrationBuilder.CreateIndex(
name: "IX_PublicWalkResponses_Index",
table: "PublicWalkResponses",
column: "Index");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "PublicWalkResponses");
}
}
}