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