using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace GerbilManagerWebAPI.Migrations { /// public partial class AddAcquisitionRecord : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "AcquisitionRecords", columns: table => new { Id = table.Column(type: "uuid", nullable: false), GerbilId = table.Column(type: "uuid", nullable: true), SourceContactId = table.Column(type: "uuid", nullable: true), Date = table.Column(type: "date", nullable: true), Price = table.Column(type: "numeric(10,2)", precision: 10, scale: 2, nullable: true), Note = table.Column(type: "text", nullable: true), CreatedAt = table.Column(type: "timestamp with time zone", nullable: false) }, constraints: table => { table.PrimaryKey("PK_AcquisitionRecords", x => x.Id); }); migrationBuilder.CreateIndex( name: "IX_AcquisitionRecords_GerbilId", table: "AcquisitionRecords", column: "GerbilId"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "AcquisitionRecords"); } } }