using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace GerbilManagerWebAPI.Migrations
{
///
public partial class AddSaleReservation : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "SaleReservations",
columns: table => new
{
Id = table.Column(type: "uuid", nullable: false),
GerbilId = table.Column(type: "uuid", nullable: false),
GerbilName = table.Column(type: "text", nullable: true),
Status = table.Column(type: "text", nullable: false),
ReservedForContactId = table.Column(type: "uuid", nullable: true),
ContactName = table.Column(type: "text", nullable: true),
AppointmentDate = table.Column(type: "timestamp with time zone", nullable: true),
Price = table.Column(type: "numeric(10,2)", precision: 10, scale: 2, nullable: true),
Note = table.Column(type: "text", nullable: true),
HandedOverDate = table.Column(type: "timestamp with time zone", nullable: true),
CreatedAt = table.Column(type: "timestamp with time zone", nullable: false),
UpdatedAt = table.Column(type: "timestamp with time zone", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_SaleReservations", x => x.Id);
});
migrationBuilder.CreateIndex(
name: "IX_SaleReservations_GerbilId",
table: "SaleReservations",
column: "GerbilId");
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "SaleReservations");
}
}
}