77 lines
2.4 KiB
C#
77 lines
2.4 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Marco.Pms.DataAccess.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class Added_GSTNumber_In_Organization_Table : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterColumn<long>(
|
|
name: "SPRID",
|
|
table: "TenantOrgMappings",
|
|
type: "bigint",
|
|
nullable: false,
|
|
oldClrType: typeof(double),
|
|
oldType: "double");
|
|
|
|
migrationBuilder.AlterColumn<long>(
|
|
name: "SPRID",
|
|
table: "Organizations",
|
|
type: "bigint",
|
|
nullable: false,
|
|
oldClrType: typeof(double),
|
|
oldType: "double");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "GSTNumber",
|
|
table: "Organizations",
|
|
type: "longtext",
|
|
nullable: true)
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "Organizations",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("4e3a6d31-c640-40f7-8d67-6c109fcdb9ea"),
|
|
columns: new[] { "GSTNumber", "SPRID" },
|
|
values: new object[] { null, 5400L });
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "GSTNumber",
|
|
table: "Organizations");
|
|
|
|
migrationBuilder.AlterColumn<double>(
|
|
name: "SPRID",
|
|
table: "TenantOrgMappings",
|
|
type: "double",
|
|
nullable: false,
|
|
oldClrType: typeof(long),
|
|
oldType: "bigint");
|
|
|
|
migrationBuilder.AlterColumn<double>(
|
|
name: "SPRID",
|
|
table: "Organizations",
|
|
type: "double",
|
|
nullable: false,
|
|
oldClrType: typeof(long),
|
|
oldType: "bigint");
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "Organizations",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("4e3a6d31-c640-40f7-8d67-6c109fcdb9ea"),
|
|
column: "SPRID",
|
|
value: 5400.0);
|
|
}
|
|
}
|
|
}
|