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