This commit is contained in:
2023-06-17 14:16:09 +03:00
parent 62178f1f32
commit 7ae5d3bc81
180 changed files with 12932 additions and 192 deletions
@@ -0,0 +1,61 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace MyOffice.Migrations.Postgres.Migrations
{
/// <inheritdoc />
public partial class usercurrency : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "CurrencyId",
table: "Users",
type: "text",
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "Symbol",
table: "CurrencyGlobals",
type: "text",
nullable: false,
defaultValue: "");
migrationBuilder.CreateIndex(
name: "IX_Users_CurrencyId",
table: "Users",
column: "CurrencyId");
migrationBuilder.AddForeignKey(
name: "FK_Users_CurrencyGlobals_CurrencyId",
table: "Users",
column: "CurrencyId",
principalTable: "CurrencyGlobals",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Users_CurrencyGlobals_CurrencyId",
table: "Users");
migrationBuilder.DropIndex(
name: "IX_Users_CurrencyId",
table: "Users");
migrationBuilder.DropColumn(
name: "CurrencyId",
table: "Users");
migrationBuilder.DropColumn(
name: "Symbol",
table: "CurrencyGlobals");
}
}
}