Math is hard
This commit is contained in:
+353
@@ -0,0 +1,353 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using fxl.codes.kisekae;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace fxl.codes.kisekae.Migrations
|
||||
{
|
||||
[DbContext(typeof(KisekaeContext))]
|
||||
[Migration("20211120201836_UseBackgroundHex")]
|
||||
partial class UseBackgroundHex
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "6.0.0")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("fxl.codes.kisekae.Entities.Action", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int?>("ConfigurationId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ConfigurationId");
|
||||
|
||||
b.ToTable("Action");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("fxl.codes.kisekae.Entities.Cel", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<byte[]>("Data")
|
||||
.HasColumnType("bytea");
|
||||
|
||||
b.Property<string>("FileName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("Height")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("KisekaeId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("OffsetX")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("OffsetY")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("Width")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("KisekaeId");
|
||||
|
||||
b.ToTable("Cels");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("fxl.codes.kisekae.Entities.CelConfig", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int?>("CelId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Comment")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("ConfigurationId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("Fix")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("Mark")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("PaletteGroup")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("PaletteId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("RenderId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("Sets")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("Transparency")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("X")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("Y")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CelId");
|
||||
|
||||
b.HasIndex("ConfigurationId");
|
||||
|
||||
b.HasIndex("PaletteId");
|
||||
|
||||
b.HasIndex("RenderId");
|
||||
|
||||
b.ToTable("CelConfigs");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("fxl.codes.kisekae.Entities.Configuration", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("BackgroundColorHex")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Data")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("Height")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("KisekaeId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("Width")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("KisekaeId");
|
||||
|
||||
b.ToTable("Configurations");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("fxl.codes.kisekae.Entities.Kisekae", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("CheckSum")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("FileName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("KisekaeSets");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("fxl.codes.kisekae.Entities.Palette", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Comment")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<byte[]>("Data")
|
||||
.HasColumnType("bytea");
|
||||
|
||||
b.Property<string>("FileName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("KisekaeId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("KisekaeId");
|
||||
|
||||
b.ToTable("Palettes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("fxl.codes.kisekae.Entities.PaletteColor", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("Group")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Hex")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("PaletteId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("PaletteId");
|
||||
|
||||
b.ToTable("PaletteColors");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("fxl.codes.kisekae.Entities.Render", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<byte[]>("Image")
|
||||
.HasColumnType("bytea");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Renders");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("fxl.codes.kisekae.Entities.Action", b =>
|
||||
{
|
||||
b.HasOne("fxl.codes.kisekae.Entities.Configuration", null)
|
||||
.WithMany("Actions")
|
||||
.HasForeignKey("ConfigurationId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("fxl.codes.kisekae.Entities.Cel", b =>
|
||||
{
|
||||
b.HasOne("fxl.codes.kisekae.Entities.Kisekae", "Kisekae")
|
||||
.WithMany("Cels")
|
||||
.HasForeignKey("KisekaeId");
|
||||
|
||||
b.Navigation("Kisekae");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("fxl.codes.kisekae.Entities.CelConfig", b =>
|
||||
{
|
||||
b.HasOne("fxl.codes.kisekae.Entities.Cel", "Cel")
|
||||
.WithMany()
|
||||
.HasForeignKey("CelId");
|
||||
|
||||
b.HasOne("fxl.codes.kisekae.Entities.Configuration", "Configuration")
|
||||
.WithMany("Cels")
|
||||
.HasForeignKey("ConfigurationId");
|
||||
|
||||
b.HasOne("fxl.codes.kisekae.Entities.Palette", "Palette")
|
||||
.WithMany()
|
||||
.HasForeignKey("PaletteId");
|
||||
|
||||
b.HasOne("fxl.codes.kisekae.Entities.Render", "Render")
|
||||
.WithMany()
|
||||
.HasForeignKey("RenderId");
|
||||
|
||||
b.Navigation("Cel");
|
||||
|
||||
b.Navigation("Configuration");
|
||||
|
||||
b.Navigation("Palette");
|
||||
|
||||
b.Navigation("Render");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("fxl.codes.kisekae.Entities.Configuration", b =>
|
||||
{
|
||||
b.HasOne("fxl.codes.kisekae.Entities.Kisekae", "Kisekae")
|
||||
.WithMany("Configurations")
|
||||
.HasForeignKey("KisekaeId");
|
||||
|
||||
b.Navigation("Kisekae");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("fxl.codes.kisekae.Entities.Palette", b =>
|
||||
{
|
||||
b.HasOne("fxl.codes.kisekae.Entities.Kisekae", "Kisekae")
|
||||
.WithMany("Palettes")
|
||||
.HasForeignKey("KisekaeId");
|
||||
|
||||
b.Navigation("Kisekae");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("fxl.codes.kisekae.Entities.PaletteColor", b =>
|
||||
{
|
||||
b.HasOne("fxl.codes.kisekae.Entities.Palette", "Palette")
|
||||
.WithMany("Colors")
|
||||
.HasForeignKey("PaletteId");
|
||||
|
||||
b.Navigation("Palette");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("fxl.codes.kisekae.Entities.Configuration", b =>
|
||||
{
|
||||
b.Navigation("Actions");
|
||||
|
||||
b.Navigation("Cels");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("fxl.codes.kisekae.Entities.Kisekae", b =>
|
||||
{
|
||||
b.Navigation("Cels");
|
||||
|
||||
b.Navigation("Configurations");
|
||||
|
||||
b.Navigation("Palettes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("fxl.codes.kisekae.Entities.Palette", b =>
|
||||
{
|
||||
b.Navigation("Colors");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace fxl.codes.kisekae.Migrations
|
||||
{
|
||||
public partial class UseBackgroundHex : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "BorderIndex",
|
||||
table: "Configurations");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "BackgroundColorHex",
|
||||
table: "Configurations",
|
||||
type: "text",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "BackgroundColorHex",
|
||||
table: "Configurations");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "BorderIndex",
|
||||
table: "Configurations",
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
+386
@@ -0,0 +1,386 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using fxl.codes.kisekae;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace fxl.codes.kisekae.Migrations
|
||||
{
|
||||
[DbContext(typeof(KisekaeContext))]
|
||||
[Migration("20211121011039_Positions")]
|
||||
partial class Positions
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "6.0.0")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("fxl.codes.kisekae.Entities.Action", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int?>("ConfigurationId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ConfigurationId");
|
||||
|
||||
b.ToTable("Action");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("fxl.codes.kisekae.Entities.Cel", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<byte[]>("Data")
|
||||
.HasColumnType("bytea");
|
||||
|
||||
b.Property<string>("FileName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("Height")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("KisekaeId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("OffsetX")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("OffsetY")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("Width")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("KisekaeId");
|
||||
|
||||
b.ToTable("Cels");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("fxl.codes.kisekae.Entities.CelConfig", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int?>("CelId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Comment")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("ConfigurationId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("Fix")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("Mark")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("PaletteGroup")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("PaletteId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("RenderId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("Sets")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("Transparency")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CelId");
|
||||
|
||||
b.HasIndex("ConfigurationId");
|
||||
|
||||
b.HasIndex("PaletteId");
|
||||
|
||||
b.HasIndex("RenderId");
|
||||
|
||||
b.ToTable("CelConfigs");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("fxl.codes.kisekae.Entities.CelPosition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int?>("CelConfigId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("Set")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("X")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("Y")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CelConfigId");
|
||||
|
||||
b.ToTable("CelPosition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("fxl.codes.kisekae.Entities.Configuration", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("BackgroundColorHex")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Data")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("Height")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("KisekaeId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("Width")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("KisekaeId");
|
||||
|
||||
b.ToTable("Configurations");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("fxl.codes.kisekae.Entities.Kisekae", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("CheckSum")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("FileName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("KisekaeSets");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("fxl.codes.kisekae.Entities.Palette", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Comment")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<byte[]>("Data")
|
||||
.HasColumnType("bytea");
|
||||
|
||||
b.Property<string>("FileName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("KisekaeId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("KisekaeId");
|
||||
|
||||
b.ToTable("Palettes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("fxl.codes.kisekae.Entities.PaletteColor", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("Group")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Hex")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("PaletteId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("PaletteId");
|
||||
|
||||
b.ToTable("PaletteColors");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("fxl.codes.kisekae.Entities.Render", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<byte[]>("Image")
|
||||
.HasColumnType("bytea");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Renders");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("fxl.codes.kisekae.Entities.Action", b =>
|
||||
{
|
||||
b.HasOne("fxl.codes.kisekae.Entities.Configuration", null)
|
||||
.WithMany("Actions")
|
||||
.HasForeignKey("ConfigurationId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("fxl.codes.kisekae.Entities.Cel", b =>
|
||||
{
|
||||
b.HasOne("fxl.codes.kisekae.Entities.Kisekae", "Kisekae")
|
||||
.WithMany("Cels")
|
||||
.HasForeignKey("KisekaeId");
|
||||
|
||||
b.Navigation("Kisekae");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("fxl.codes.kisekae.Entities.CelConfig", b =>
|
||||
{
|
||||
b.HasOne("fxl.codes.kisekae.Entities.Cel", "Cel")
|
||||
.WithMany()
|
||||
.HasForeignKey("CelId");
|
||||
|
||||
b.HasOne("fxl.codes.kisekae.Entities.Configuration", "Configuration")
|
||||
.WithMany("Cels")
|
||||
.HasForeignKey("ConfigurationId");
|
||||
|
||||
b.HasOne("fxl.codes.kisekae.Entities.Palette", "Palette")
|
||||
.WithMany()
|
||||
.HasForeignKey("PaletteId");
|
||||
|
||||
b.HasOne("fxl.codes.kisekae.Entities.Render", "Render")
|
||||
.WithMany()
|
||||
.HasForeignKey("RenderId");
|
||||
|
||||
b.Navigation("Cel");
|
||||
|
||||
b.Navigation("Configuration");
|
||||
|
||||
b.Navigation("Palette");
|
||||
|
||||
b.Navigation("Render");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("fxl.codes.kisekae.Entities.CelPosition", b =>
|
||||
{
|
||||
b.HasOne("fxl.codes.kisekae.Entities.CelConfig", null)
|
||||
.WithMany("Positions")
|
||||
.HasForeignKey("CelConfigId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("fxl.codes.kisekae.Entities.Configuration", b =>
|
||||
{
|
||||
b.HasOne("fxl.codes.kisekae.Entities.Kisekae", "Kisekae")
|
||||
.WithMany("Configurations")
|
||||
.HasForeignKey("KisekaeId");
|
||||
|
||||
b.Navigation("Kisekae");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("fxl.codes.kisekae.Entities.Palette", b =>
|
||||
{
|
||||
b.HasOne("fxl.codes.kisekae.Entities.Kisekae", "Kisekae")
|
||||
.WithMany("Palettes")
|
||||
.HasForeignKey("KisekaeId");
|
||||
|
||||
b.Navigation("Kisekae");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("fxl.codes.kisekae.Entities.PaletteColor", b =>
|
||||
{
|
||||
b.HasOne("fxl.codes.kisekae.Entities.Palette", "Palette")
|
||||
.WithMany("Colors")
|
||||
.HasForeignKey("PaletteId");
|
||||
|
||||
b.Navigation("Palette");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("fxl.codes.kisekae.Entities.CelConfig", b =>
|
||||
{
|
||||
b.Navigation("Positions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("fxl.codes.kisekae.Entities.Configuration", b =>
|
||||
{
|
||||
b.Navigation("Actions");
|
||||
|
||||
b.Navigation("Cels");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("fxl.codes.kisekae.Entities.Kisekae", b =>
|
||||
{
|
||||
b.Navigation("Cels");
|
||||
|
||||
b.Navigation("Configurations");
|
||||
|
||||
b.Navigation("Palettes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("fxl.codes.kisekae.Entities.Palette", b =>
|
||||
{
|
||||
b.Navigation("Colors");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace fxl.codes.kisekae.Migrations
|
||||
{
|
||||
public partial class Positions : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "X",
|
||||
table: "CelConfigs");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Y",
|
||||
table: "CelConfigs");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "CelPosition",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
Set = table.Column<int>(type: "integer", nullable: false),
|
||||
X = table.Column<int>(type: "integer", nullable: false),
|
||||
Y = table.Column<int>(type: "integer", nullable: false),
|
||||
CelConfigId = table.Column<int>(type: "integer", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_CelPosition", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_CelPosition_CelConfigs_CelConfigId",
|
||||
column: x => x.CelConfigId,
|
||||
principalTable: "CelConfigs",
|
||||
principalColumn: "Id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_CelPosition_CelConfigId",
|
||||
table: "CelPosition",
|
||||
column: "CelConfigId");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "CelPosition");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "X",
|
||||
table: "CelConfigs",
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "Y",
|
||||
table: "CelConfigs",
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -117,12 +117,6 @@ namespace fxl.codes.kisekae.Migrations
|
||||
b.Property<int>("Transparency")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("X")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("Y")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CelId");
|
||||
@@ -136,6 +130,33 @@ namespace fxl.codes.kisekae.Migrations
|
||||
b.ToTable("CelConfigs");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("fxl.codes.kisekae.Entities.CelPosition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int?>("CelConfigId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("Set")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("X")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("Y")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CelConfigId");
|
||||
|
||||
b.ToTable("CelPosition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("fxl.codes.kisekae.Entities.Configuration", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
@@ -144,8 +165,8 @@ namespace fxl.codes.kisekae.Migrations
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("BorderIndex")
|
||||
.HasColumnType("integer");
|
||||
b.Property<string>("BackgroundColorHex")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Data")
|
||||
.HasColumnType("text");
|
||||
@@ -298,6 +319,13 @@ namespace fxl.codes.kisekae.Migrations
|
||||
b.Navigation("Render");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("fxl.codes.kisekae.Entities.CelPosition", b =>
|
||||
{
|
||||
b.HasOne("fxl.codes.kisekae.Entities.CelConfig", null)
|
||||
.WithMany("Positions")
|
||||
.HasForeignKey("CelConfigId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("fxl.codes.kisekae.Entities.Configuration", b =>
|
||||
{
|
||||
b.HasOne("fxl.codes.kisekae.Entities.Kisekae", "Kisekae")
|
||||
@@ -325,6 +353,11 @@ namespace fxl.codes.kisekae.Migrations
|
||||
b.Navigation("Palette");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("fxl.codes.kisekae.Entities.CelConfig", b =>
|
||||
{
|
||||
b.Navigation("Positions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("fxl.codes.kisekae.Entities.Configuration", b =>
|
||||
{
|
||||
b.Navigation("Actions");
|
||||
|
||||
Reference in New Issue
Block a user