62 lines
1.8 KiB
C#
62 lines
1.8 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Marco.Pms.DataAccess.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class Added_EInvoiceNumber_In_Invoice_Table : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.RenameColumn(
|
|
name: "Amount",
|
|
table: "Invoices",
|
|
newName: "TaxAmount");
|
|
|
|
migrationBuilder.AddColumn<double>(
|
|
name: "BasicAmount",
|
|
table: "Invoices",
|
|
type: "double",
|
|
nullable: false,
|
|
defaultValue: 0.0);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "EInvoiceNumber",
|
|
table: "Invoices",
|
|
type: "longtext",
|
|
nullable: true)
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<bool>(
|
|
name: "MarkAsCompleted",
|
|
table: "Invoices",
|
|
type: "tinyint(1)",
|
|
nullable: false,
|
|
defaultValue: false);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "BasicAmount",
|
|
table: "Invoices");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "EInvoiceNumber",
|
|
table: "Invoices");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "MarkAsCompleted",
|
|
table: "Invoices");
|
|
|
|
migrationBuilder.RenameColumn(
|
|
name: "TaxAmount",
|
|
table: "Invoices",
|
|
newName: "Amount");
|
|
}
|
|
}
|
|
}
|