Renames ProfileColors to Colors
This commit is contained in:
@@ -12,7 +12,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
namespace Hutopy.Web.Features.Contents.Migrations
|
||||
{
|
||||
[DbContext(typeof(ContentDbContext))]
|
||||
[Migration("20240806050040_Initial")]
|
||||
[Migration("20240806065219_Initial")]
|
||||
partial class Initial
|
||||
{
|
||||
/// <inheritdoc />
|
||||
@@ -134,28 +134,7 @@ namespace Hutopy.Web.Features.Contents.Migrations
|
||||
.HasForeignKey("CreatorId");
|
||||
});
|
||||
|
||||
b.OwnsOne("Hutopy.Web.Features.Contents.Data.Images", "Images", b1 =>
|
||||
{
|
||||
b1.Property<Guid>("CreatorId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b1.Property<string>("Banner")
|
||||
.HasMaxLength(255)
|
||||
.HasColumnType("character varying(255)");
|
||||
|
||||
b1.Property<string>("Logo")
|
||||
.HasMaxLength(255)
|
||||
.HasColumnType("character varying(255)");
|
||||
|
||||
b1.HasKey("CreatorId");
|
||||
|
||||
b1.ToTable("Images", "Content");
|
||||
|
||||
b1.WithOwner()
|
||||
.HasForeignKey("CreatorId");
|
||||
});
|
||||
|
||||
b.OwnsOne("Hutopy.Web.Features.Contents.Data.ProfileColors", "ProfileColors", b1 =>
|
||||
b.OwnsOne("Hutopy.Web.Features.Contents.Data.Colors", "Colors", b1 =>
|
||||
{
|
||||
b1.Property<Guid>("CreatorId")
|
||||
.HasColumnType("uuid");
|
||||
@@ -178,7 +157,28 @@ namespace Hutopy.Web.Features.Contents.Migrations
|
||||
|
||||
b1.HasKey("CreatorId");
|
||||
|
||||
b1.ToTable("ProfileColors", "Content");
|
||||
b1.ToTable("Colors", "Content");
|
||||
|
||||
b1.WithOwner()
|
||||
.HasForeignKey("CreatorId");
|
||||
});
|
||||
|
||||
b.OwnsOne("Hutopy.Web.Features.Contents.Data.Images", "Images", b1 =>
|
||||
{
|
||||
b1.Property<Guid>("CreatorId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b1.Property<string>("Banner")
|
||||
.HasMaxLength(255)
|
||||
.HasColumnType("character varying(255)");
|
||||
|
||||
b1.Property<string>("Logo")
|
||||
.HasMaxLength(255)
|
||||
.HasColumnType("character varying(255)");
|
||||
|
||||
b1.HasKey("CreatorId");
|
||||
|
||||
b1.ToTable("Images", "Content");
|
||||
|
||||
b1.WithOwner()
|
||||
.HasForeignKey("CreatorId");
|
||||
@@ -232,10 +232,10 @@ namespace Hutopy.Web.Features.Contents.Migrations
|
||||
b.Navigation("About")
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Images")
|
||||
b.Navigation("Colors")
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ProfileColors")
|
||||
b.Navigation("Images")
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Socials")
|
||||
@@ -31,6 +31,29 @@ namespace Hutopy.Web.Features.Contents.Migrations
|
||||
table.PrimaryKey("PK_Creators", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Colors",
|
||||
schema: "Content",
|
||||
columns: table => new
|
||||
{
|
||||
CreatorId = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
BannerTop = table.Column<string>(type: "character varying(9)", maxLength: 9, nullable: true),
|
||||
BannerBottom = table.Column<string>(type: "character varying(9)", maxLength: 9, nullable: true),
|
||||
Accent = table.Column<string>(type: "character varying(9)", maxLength: 9, nullable: true),
|
||||
Menu = table.Column<string>(type: "character varying(9)", maxLength: 9, nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Colors", x => x.CreatorId);
|
||||
table.ForeignKey(
|
||||
name: "FK_Colors_Creators_CreatorId",
|
||||
column: x => x.CreatorId,
|
||||
principalSchema: "Content",
|
||||
principalTable: "Creators",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Contents",
|
||||
schema: "Content",
|
||||
@@ -76,29 +99,6 @@ namespace Hutopy.Web.Features.Contents.Migrations
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ProfileColors",
|
||||
schema: "Content",
|
||||
columns: table => new
|
||||
{
|
||||
CreatorId = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
BannerTop = table.Column<string>(type: "character varying(9)", maxLength: 9, nullable: true),
|
||||
BannerBottom = table.Column<string>(type: "character varying(9)", maxLength: 9, nullable: true),
|
||||
Accent = table.Column<string>(type: "character varying(9)", maxLength: 9, nullable: true),
|
||||
Menu = table.Column<string>(type: "character varying(9)", maxLength: 9, nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ProfileColors", x => x.CreatorId);
|
||||
table.ForeignKey(
|
||||
name: "FK_ProfileColors_Creators_CreatorId",
|
||||
column: x => x.CreatorId,
|
||||
principalSchema: "Content",
|
||||
principalTable: "Creators",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Socials",
|
||||
schema: "Content",
|
||||
@@ -163,6 +163,10 @@ namespace Hutopy.Web.Features.Contents.Migrations
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "Colors",
|
||||
schema: "Content");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Contents",
|
||||
schema: "Content");
|
||||
@@ -171,10 +175,6 @@ namespace Hutopy.Web.Features.Contents.Migrations
|
||||
name: "Images",
|
||||
schema: "Content");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ProfileColors",
|
||||
schema: "Content");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Socials",
|
||||
schema: "Content");
|
||||
@@ -131,28 +131,7 @@ namespace Hutopy.Web.Features.Contents.Migrations
|
||||
.HasForeignKey("CreatorId");
|
||||
});
|
||||
|
||||
b.OwnsOne("Hutopy.Web.Features.Contents.Data.Images", "Images", b1 =>
|
||||
{
|
||||
b1.Property<Guid>("CreatorId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b1.Property<string>("Banner")
|
||||
.HasMaxLength(255)
|
||||
.HasColumnType("character varying(255)");
|
||||
|
||||
b1.Property<string>("Logo")
|
||||
.HasMaxLength(255)
|
||||
.HasColumnType("character varying(255)");
|
||||
|
||||
b1.HasKey("CreatorId");
|
||||
|
||||
b1.ToTable("Images", "Content");
|
||||
|
||||
b1.WithOwner()
|
||||
.HasForeignKey("CreatorId");
|
||||
});
|
||||
|
||||
b.OwnsOne("Hutopy.Web.Features.Contents.Data.ProfileColors", "ProfileColors", b1 =>
|
||||
b.OwnsOne("Hutopy.Web.Features.Contents.Data.Colors", "Colors", b1 =>
|
||||
{
|
||||
b1.Property<Guid>("CreatorId")
|
||||
.HasColumnType("uuid");
|
||||
@@ -175,7 +154,28 @@ namespace Hutopy.Web.Features.Contents.Migrations
|
||||
|
||||
b1.HasKey("CreatorId");
|
||||
|
||||
b1.ToTable("ProfileColors", "Content");
|
||||
b1.ToTable("Colors", "Content");
|
||||
|
||||
b1.WithOwner()
|
||||
.HasForeignKey("CreatorId");
|
||||
});
|
||||
|
||||
b.OwnsOne("Hutopy.Web.Features.Contents.Data.Images", "Images", b1 =>
|
||||
{
|
||||
b1.Property<Guid>("CreatorId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b1.Property<string>("Banner")
|
||||
.HasMaxLength(255)
|
||||
.HasColumnType("character varying(255)");
|
||||
|
||||
b1.Property<string>("Logo")
|
||||
.HasMaxLength(255)
|
||||
.HasColumnType("character varying(255)");
|
||||
|
||||
b1.HasKey("CreatorId");
|
||||
|
||||
b1.ToTable("Images", "Content");
|
||||
|
||||
b1.WithOwner()
|
||||
.HasForeignKey("CreatorId");
|
||||
@@ -229,10 +229,10 @@ namespace Hutopy.Web.Features.Contents.Migrations
|
||||
b.Navigation("About")
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Images")
|
||||
b.Navigation("Colors")
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ProfileColors")
|
||||
b.Navigation("Images")
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Socials")
|
||||
|
||||
Reference in New Issue
Block a user