using System.Collections.Generic; using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace comissions.app.api.Migrations { /// public partial class pagesettings : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( name: "SocialMediaLinks", table: "UserSellerProfiles"); migrationBuilder.RenameColumn( name: "Biography", table: "UserSellerProfiles", newName: "SocialMediaLink4"); migrationBuilder.AddColumn( name: "Description", table: "UserSellerProfiles", type: "text", nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "Name", table: "UserSellerProfiles", type: "text", nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "RequestGuidelines", table: "UserSellerProfiles", type: "text", nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "SellerProfilePageSettingsId", table: "UserSellerProfiles", type: "integer", nullable: false, defaultValue: 0); migrationBuilder.AddColumn( name: "SocialMediaLink1", table: "UserSellerProfiles", type: "text", nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "SocialMediaLink2", table: "UserSellerProfiles", type: "text", nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "SocialMediaLink3", table: "UserSellerProfiles", type: "text", nullable: false, defaultValue: ""); migrationBuilder.CreateTable( name: "SellerProfilePageSettings", columns: table => new { Id = table.Column(type: "integer", nullable: false) .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), SellerProfileId = table.Column(type: "integer", nullable: false), RequestButtonHoverBGColor = table.Column(type: "text", nullable: false), RequestButtonTextColor = table.Column(type: "text", nullable: false), RequestButtonBGColor = table.Column(type: "text", nullable: false), RequestTermsColor = table.Column(type: "text", nullable: false), RequestBackgroundColor = table.Column(type: "text", nullable: false), RequestHeaderImageUrl = table.Column(type: "text", nullable: false), RequestHeaderUseImage = table.Column(type: "boolean", nullable: false), RequestHeaderSize = table.Column(type: "integer", nullable: false), RequestHeaderColor = table.Column(type: "text", nullable: false), RequestHeaderText = table.Column(type: "text", nullable: false), PortfolioMaximumSize = table.Column(type: "integer", nullable: false), PortfolioEnabledScrolling = table.Column(type: "boolean", nullable: false), PortfolioColumns = table.Column(type: "integer", nullable: false), PortfolioMasonry = table.Column(type: "boolean", nullable: false), PortfolioBackgroundColor = table.Column(type: "text", nullable: false), PortfolionHeaderImageUrl = table.Column(type: "text", nullable: false), PortfolionHeaderUseImage = table.Column(type: "boolean", nullable: false), PortfolionHeaderSize = table.Column(type: "integer", nullable: false), PortfolionHeaderColor = table.Column(type: "text", nullable: false), PortfolionHeaderText = table.Column(type: "text", nullable: false), DescriptionTextSize = table.Column(type: "integer", nullable: false), DescriptionTextColor = table.Column(type: "text", nullable: false), DescriptionBackgroundColor = table.Column(type: "text", nullable: false), DescriptionHeaderImageUrl = table.Column(type: "text", nullable: false), DescriptionHeaderUseImage = table.Column(type: "boolean", nullable: false), DescriptionHeaderSize = table.Column(type: "integer", nullable: false), DescriptionHeaderColor = table.Column(type: "text", nullable: false), DescriptionHeaderText = table.Column(type: "text", nullable: false), HeaderImageUrl = table.Column(type: "text", nullable: false), HeaderUseImage = table.Column(type: "boolean", nullable: false), HeaderTextSize = table.Column(type: "integer", nullable: false), HeaderColor = table.Column(type: "text", nullable: false), BackgroundColor = table.Column(type: "text", nullable: false) }, constraints: table => { table.PrimaryKey("PK_SellerProfilePageSettings", x => x.Id); table.ForeignKey( name: "FK_SellerProfilePageSettings_UserSellerProfiles_SellerProfileId", column: x => x.SellerProfileId, principalTable: "UserSellerProfiles", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateIndex( name: "IX_SellerProfilePageSettings_SellerProfileId", table: "SellerProfilePageSettings", column: "SellerProfileId", unique: true); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "SellerProfilePageSettings"); migrationBuilder.DropColumn( name: "Description", table: "UserSellerProfiles"); migrationBuilder.DropColumn( name: "Name", table: "UserSellerProfiles"); migrationBuilder.DropColumn( name: "RequestGuidelines", table: "UserSellerProfiles"); migrationBuilder.DropColumn( name: "SellerProfilePageSettingsId", table: "UserSellerProfiles"); migrationBuilder.DropColumn( name: "SocialMediaLink1", table: "UserSellerProfiles"); migrationBuilder.DropColumn( name: "SocialMediaLink2", table: "UserSellerProfiles"); migrationBuilder.DropColumn( name: "SocialMediaLink3", table: "UserSellerProfiles"); migrationBuilder.RenameColumn( name: "SocialMediaLink4", table: "UserSellerProfiles", newName: "Biography"); migrationBuilder.AddColumn>( name: "SocialMediaLinks", table: "UserSellerProfiles", type: "text[]", nullable: false); } } }