gehgassi_backend/gehGassi.Persistence/Migrations/20221018163002_PublicWalkRequest.cs

62 lines
3.5 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
using NetTopologySuite.Geometries;
#nullable disable
namespace gehGassi.Persistence.Migrations
{
public partial class PublicWalkRequest : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "PublicWalkRequests",
columns: table => new
{
Id = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
DogOwnerId = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
PickupAddress_AddressLine1 = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
PickupAddress_AddressLine2 = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
PickupAddress_City = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
PickupAddress_Zip = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
PickupAddress_State = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
PickupAddress_CountryCode = table.Column<string>(type: "nvarchar(2)", maxLength: 2, nullable: true),
Location = table.Column<Point>(type: "geography", nullable: true),
RequestType = table.Column<int>(type: "int", nullable: false),
StartDate = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: false),
EndDate = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: false),
DogId = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
Exclusive = table.Column<bool>(type: "bit", nullable: false),
Price = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
Info = table.Column<string>(type: "nvarchar(max)", nullable: true),
ExpirationDate = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: false),
DogWalkerId = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
PublicWalkResponseId = table.Column<string>(type: "nvarchar(max)", nullable: true),
ResponseCount = table.Column<int>(type: "int", nullable: false),
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_PublicWalkRequests", x => x.Id);
});
migrationBuilder.CreateIndex(
name: "IX_PublicWalkRequests_Index",
table: "PublicWalkRequests",
column: "Index");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "PublicWalkRequests");
}
}
}