gehgassi_app/gehGassiApp/gehGassiApp.Data/Migrations/20221026132127_WalksAdded.cs

64 lines
3.9 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace gehGassiApp.Data.Migrations
{
public partial class WalksAdded : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Walks",
columns: table => new
{
Id = table.Column<string>(type: "TEXT", maxLength: 128, nullable: false),
Type = table.Column<int>(type: "INTEGER", nullable: false),
DogWalkerId = table.Column<string>(type: "TEXT", maxLength: 128, nullable: true),
DogOwnerId = table.Column<string>(type: "TEXT", maxLength: 128, nullable: true),
PublicWalkRequestId = table.Column<string>(type: "TEXT", maxLength: 128, nullable: true),
DogsJson = table.Column<string>(type: "TEXT", nullable: true),
DogCount = table.Column<int>(type: "INTEGER", nullable: false),
Start = table.Column<long>(type: "INTEGER", nullable: false),
End = table.Column<long>(type: "INTEGER", nullable: false),
PickupAddress_AddressLine1 = table.Column<string>(type: "TEXT", maxLength: 100, nullable: true),
PickupAddress_AddressLine2 = table.Column<string>(type: "TEXT", maxLength: 100, nullable: true),
PickupAddress_City = table.Column<string>(type: "TEXT", maxLength: 100, nullable: true),
PickupAddress_Zip = table.Column<string>(type: "TEXT", maxLength: 20, nullable: true),
PickupAddress_State = table.Column<string>(type: "TEXT", maxLength: 100, nullable: true),
PickupAddress_CountryCode = table.Column<string>(type: "TEXT", maxLength: 2, nullable: true),
ReturnAddress_AddressLine1 = table.Column<string>(type: "TEXT", maxLength: 100, nullable: true),
ReturnAddress_AddressLine2 = table.Column<string>(type: "TEXT", maxLength: 100, nullable: true),
ReturnAddress_City = table.Column<string>(type: "TEXT", maxLength: 100, nullable: true),
ReturnAddress_Zip = table.Column<string>(type: "TEXT", maxLength: 20, nullable: true),
ReturnAddress_State = table.Column<string>(type: "TEXT", maxLength: 100, nullable: true),
ReturnAddress_CountryCode = table.Column<string>(type: "TEXT", maxLength: 2, nullable: true),
Price = table.Column<decimal>(type: "TEXT", nullable: false),
Info = table.Column<string>(type: "TEXT", maxLength: 500, nullable: true),
Status = table.Column<int>(type: "INTEGER", nullable: false),
DeclinedReason = table.Column<string>(type: "TEXT", maxLength: 500, nullable: true),
CancelledReason = table.Column<string>(type: "TEXT", maxLength: 500, nullable: true),
CancelledBy = table.Column<int>(type: "INTEGER", nullable: false),
PaymentStatus = table.Column<int>(type: "INTEGER", nullable: false),
Created = table.Column<long>(type: "INTEGER", nullable: false),
Version = table.Column<byte[]>(type: "BLOB", rowVersion: true, nullable: true),
UpdatedAt = table.Column<long>(type: "INTEGER", nullable: false),
Deleted = table.Column<bool>(type: "INTEGER", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Walks", x => x.Id);
});
System.Diagnostics.Debug.WriteLine($"Migration WalksAdded done");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Walks");
}
}
}