using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace DatabaseImplement.Migrations { /// public partial class purchase : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AlterColumn( name: "Birthday", table: "Users", type: "timestamp without time zone", nullable: false, oldClrType: typeof(DateTime), oldType: "timestamp with time zone"); migrationBuilder.AlterColumn( name: "DateComplete", table: "Supplies", type: "timestamp without time zone", nullable: true, oldClrType: typeof(DateTime), oldType: "timestamp with time zone", oldNullable: true); migrationBuilder.AlterColumn( name: "DateArriving", table: "Supplies", type: "timestamp without time zone", nullable: true, oldClrType: typeof(DateTime), oldType: "timestamp with time zone", oldNullable: true); migrationBuilder.AlterColumn( name: "Date", table: "Supplies", type: "timestamp without time zone", nullable: false, oldClrType: typeof(DateTime), oldType: "timestamp with time zone"); migrationBuilder.AlterColumn( name: "DateSell", table: "Sells", type: "timestamp without time zone", nullable: false, oldClrType: typeof(DateTime), oldType: "timestamp with time zone"); migrationBuilder.AlterColumn( name: "DatePurchase", table: "Purchases", type: "timestamp without time zone", nullable: false, oldClrType: typeof(DateTime), oldType: "timestamp with time zone"); migrationBuilder.AddColumn( name: "Cost", table: "Purchases", type: "double precision", nullable: false, defaultValue: 0.0); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( name: "Cost", table: "Purchases"); migrationBuilder.AlterColumn( name: "Birthday", table: "Users", type: "timestamp with time zone", nullable: false, oldClrType: typeof(DateTime), oldType: "timestamp without time zone"); migrationBuilder.AlterColumn( name: "DateComplete", table: "Supplies", type: "timestamp with time zone", nullable: true, oldClrType: typeof(DateTime), oldType: "timestamp without time zone", oldNullable: true); migrationBuilder.AlterColumn( name: "DateArriving", table: "Supplies", type: "timestamp with time zone", nullable: true, oldClrType: typeof(DateTime), oldType: "timestamp without time zone", oldNullable: true); migrationBuilder.AlterColumn( name: "Date", table: "Supplies", type: "timestamp with time zone", nullable: false, oldClrType: typeof(DateTime), oldType: "timestamp without time zone"); migrationBuilder.AlterColumn( name: "DateSell", table: "Sells", type: "timestamp with time zone", nullable: false, oldClrType: typeof(DateTime), oldType: "timestamp without time zone"); migrationBuilder.AlterColumn( name: "DatePurchase", table: "Purchases", type: "timestamp with time zone", nullable: false, oldClrType: typeof(DateTime), oldType: "timestamp without time zone"); } } }