Files
Finlytic/FinlyticAssets/Migrations/20260813202348_UpdateDerivativeAssets.cs
T

185 lines
5.8 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace FinlyticAssets.Migrations
{
/// <inheritdoc />
public partial class UpdateDerivativeAssets : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "UnderlyingIsin",
table: "TradeRepublicAssets",
type: "character varying(12)",
maxLength: 12,
nullable: true,
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AddColumn<decimal>(
name: "Barrier",
table: "TradeRepublicAssets",
type: "numeric(18,6)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Currency",
table: "TradeRepublicAssets",
type: "character varying(10)",
maxLength: 10,
nullable: true);
migrationBuilder.AddColumn<decimal>(
name: "Delta",
table: "TradeRepublicAssets",
type: "numeric",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "Expiry",
table: "TradeRepublicAssets",
type: "timestamp with time zone",
nullable: true);
migrationBuilder.AddColumn<decimal>(
name: "Factor",
table: "TradeRepublicAssets",
type: "numeric",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Issuer",
table: "TradeRepublicAssets",
type: "character varying(150)",
maxLength: 150,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "IssuerDisplayName",
table: "TradeRepublicAssets",
type: "character varying(150)",
maxLength: 150,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "IssuerImageId",
table: "TradeRepublicAssets",
type: "text",
nullable: true);
migrationBuilder.AddColumn<decimal>(
name: "Leverage",
table: "TradeRepublicAssets",
type: "numeric(10,4)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "NextGenProductCategoryName",
table: "TradeRepublicAssets",
type: "character varying(100)",
maxLength: 100,
nullable: true);
migrationBuilder.AddColumn<int>(
name: "OptionType",
table: "TradeRepublicAssets",
type: "integer",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "ProductCategoryName",
table: "TradeRepublicAssets",
type: "character varying(100)",
maxLength: 100,
nullable: true);
migrationBuilder.AddColumn<decimal>(
name: "Size",
table: "TradeRepublicAssets",
type: "numeric",
nullable: true);
migrationBuilder.AddColumn<decimal>(
name: "Strike",
table: "TradeRepublicAssets",
type: "numeric(18,6)",
nullable: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Barrier",
table: "TradeRepublicAssets");
migrationBuilder.DropColumn(
name: "Currency",
table: "TradeRepublicAssets");
migrationBuilder.DropColumn(
name: "Delta",
table: "TradeRepublicAssets");
migrationBuilder.DropColumn(
name: "Expiry",
table: "TradeRepublicAssets");
migrationBuilder.DropColumn(
name: "Factor",
table: "TradeRepublicAssets");
migrationBuilder.DropColumn(
name: "Issuer",
table: "TradeRepublicAssets");
migrationBuilder.DropColumn(
name: "IssuerDisplayName",
table: "TradeRepublicAssets");
migrationBuilder.DropColumn(
name: "IssuerImageId",
table: "TradeRepublicAssets");
migrationBuilder.DropColumn(
name: "Leverage",
table: "TradeRepublicAssets");
migrationBuilder.DropColumn(
name: "NextGenProductCategoryName",
table: "TradeRepublicAssets");
migrationBuilder.DropColumn(
name: "OptionType",
table: "TradeRepublicAssets");
migrationBuilder.DropColumn(
name: "ProductCategoryName",
table: "TradeRepublicAssets");
migrationBuilder.DropColumn(
name: "Size",
table: "TradeRepublicAssets");
migrationBuilder.DropColumn(
name: "Strike",
table: "TradeRepublicAssets");
migrationBuilder.AlterColumn<string>(
name: "UnderlyingIsin",
table: "TradeRepublicAssets",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(12)",
oldMaxLength: 12,
oldNullable: true);
}
}
}