using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace DatabaseImplement.Migrations { /// public partial class dates_migration : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "DateArriving", table: "Supplies", type: "timestamp with time zone", nullable: true); migrationBuilder.AddColumn( name: "DateComplete", table: "Supplies", type: "timestamp with time zone", nullable: true); migrationBuilder.CreateIndex( name: "IX_MediaFiles_ProductId", table: "MediaFiles", column: "ProductId"); migrationBuilder.AddForeignKey( name: "FK_MediaFiles_Products_ProductId", table: "MediaFiles", column: "ProductId", principalTable: "Products", principalColumn: "Id", onDelete: ReferentialAction.Cascade); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_MediaFiles_Products_ProductId", table: "MediaFiles"); migrationBuilder.DropIndex( name: "IX_MediaFiles_ProductId", table: "MediaFiles"); migrationBuilder.DropColumn( name: "DateArriving", table: "Supplies"); migrationBuilder.DropColumn( name: "DateComplete", table: "Supplies"); } } }