gehgassi_backend/gehGassi.Persistence/Migrations/20221101141016_WalkingTimesAdded.cs

41 lines
1.7 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace gehGassi.Persistence.Migrations
{
public partial class WalkingTimesAdded : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "WalkingTimes",
columns: table => new
{
Id = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
DogWalkerId = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
Day = table.Column<int>(type: "int", nullable: false),
Start = table.Column<TimeSpan>(type: "time", nullable: false),
End = table.Column<TimeSpan>(type: "time", nullable: false),
Enabled = table.Column<bool>(type: "bit", 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_WalkingTimes", x => x.Id);
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "WalkingTimes");
}
}
}