69 lines
4.3 KiB
C#
69 lines
4.3 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace gehGassi.Persistence.Migrations
|
|
{
|
|
public partial class WalksAdded : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "Walks",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
|
Type = table.Column<int>(type: "int", nullable: false),
|
|
DogWalkerId = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
|
DogOwnerId = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
|
PublicWalkRequestId = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
|
|
DogsJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
DogCount = table.Column<int>(type: "int", nullable: false),
|
|
Start = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: false),
|
|
End = table.Column<DateTimeOffset>(type: "datetimeoffset", 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),
|
|
ReturnAddress_AddressLine1 = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
|
|
ReturnAddress_AddressLine2 = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
|
|
ReturnAddress_City = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
|
|
ReturnAddress_Zip = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
|
|
ReturnAddress_State = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
|
|
ReturnAddress_CountryCode = table.Column<string>(type: "nvarchar(2)", maxLength: 2, nullable: true),
|
|
Price = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
|
|
Info = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
|
|
Status = table.Column<int>(type: "int", nullable: false),
|
|
DeclinedReason = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
|
|
CancelledReason = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
|
|
CancelledBy = table.Column<int>(type: "int", nullable: false),
|
|
PaymentStatus = 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_Walks", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_Walks_Index",
|
|
table: "Walks",
|
|
column: "Index");
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "Walks");
|
|
}
|
|
}
|
|
}
|