using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BudgetApp.Storage.Migrations
{
///
public partial class Transactions : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn(
name: "Amount",
table: "Transactions",
type: "decimal(65,30)",
nullable: false,
defaultValue: 0m);
migrationBuilder.AddColumn(
name: "Balance",
table: "Transactions",
type: "decimal(65,30)",
nullable: false,
defaultValue: 0m);
migrationBuilder.AddColumn(
name: "Category",
table: "Transactions",
type: "longtext",
nullable: false)
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn(
name: "Date",
table: "Transactions",
type: "date",
nullable: false,
defaultValue: new DateOnly(1, 1, 1));
migrationBuilder.AddColumn(
name: "Note",
table: "Transactions",
type: "longtext",
nullable: false)
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn(
name: "OperationDescription",
table: "Transactions",
type: "longtext",
nullable: false)
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn(
name: "TransactionId",
table: "Transactions",
type: "longtext",
nullable: false)
.Annotation("MySql:CharSet", "utf8mb4");
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Amount",
table: "Transactions");
migrationBuilder.DropColumn(
name: "Balance",
table: "Transactions");
migrationBuilder.DropColumn(
name: "Category",
table: "Transactions");
migrationBuilder.DropColumn(
name: "Date",
table: "Transactions");
migrationBuilder.DropColumn(
name: "Note",
table: "Transactions");
migrationBuilder.DropColumn(
name: "OperationDescription",
table: "Transactions");
migrationBuilder.DropColumn(
name: "TransactionId",
table: "Transactions");
}
}
}