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(type: "nvarchar(128)", maxLength: 128, nullable: false), Type = table.Column(type: "int", nullable: false), DogWalkerId = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), DogOwnerId = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), PublicWalkRequestId = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), DogsJson = table.Column(type: "nvarchar(max)", nullable: true), DogCount = table.Column(type: "int", nullable: false), Start = table.Column(type: "datetimeoffset", nullable: false), End = table.Column(type: "datetimeoffset", nullable: false), PickupAddress_AddressLine1 = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), PickupAddress_AddressLine2 = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), PickupAddress_City = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), PickupAddress_Zip = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), PickupAddress_State = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), PickupAddress_CountryCode = table.Column(type: "nvarchar(2)", maxLength: 2, nullable: true), ReturnAddress_AddressLine1 = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), ReturnAddress_AddressLine2 = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), ReturnAddress_City = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), ReturnAddress_Zip = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), ReturnAddress_State = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), ReturnAddress_CountryCode = table.Column(type: "nvarchar(2)", maxLength: 2, nullable: true), Price = table.Column(type: "decimal(18,2)", nullable: false), Info = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), Status = table.Column(type: "int", nullable: false), DeclinedReason = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), CancelledReason = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), CancelledBy = table.Column(type: "int", nullable: false), PaymentStatus = table.Column(type: "int", nullable: false), Created = table.Column(type: "datetimeoffset", nullable: false), Index = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), Version = table.Column(type: "rowversion", rowVersion: true, nullable: true), UpdatedAt = table.Column(type: "datetimeoffset", nullable: false), Deleted = table.Column(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"); } } }