This commit is contained in:
2026-01-05 12:44:01 +08:00
parent 41a939176e
commit ea541fb6e4
14 changed files with 171 additions and 467 deletions

View File

@@ -12,7 +12,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
namespace Atomx.Data.Migrations
{
[DbContext(typeof(DataContext))]
[Migration("20260104093702_0.1")]
[Migration("20260104144630_0.1")]
partial class _01
{
/// <inheritdoc />
@@ -239,6 +239,10 @@ namespace Atomx.Data.Migrations
b.Property<long>("Id")
.HasColumnType("bigint");
b.Property<string>("Abbreviation")
.IsRequired()
.HasColumnType("varchar(32)");
b.Property<bool>("AllowShipping")
.HasColumnType("boolean");
@@ -1382,37 +1386,6 @@ namespace Atomx.Data.Migrations
b.ToTable("SpecificationAttributeOptions");
});
modelBuilder.Entity("Atomx.Common.Entities.StateProvince", b =>
{
b.Property<long>("Id")
.HasColumnType("bigint");
b.Property<string>("Abbreviation")
.IsRequired()
.HasColumnType("varchar(32)");
b.Property<long>("CountryId")
.HasColumnType("bigint");
b.Property<int>("DisplayOrder")
.HasColumnType("integer");
b.Property<bool>("Enabled")
.HasColumnType("boolean");
b.Property<string>("Initial")
.IsRequired()
.HasColumnType("varchar(1)");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("varchar(256)");
b.HasKey("Id");
b.ToTable("StateProvinces");
});
modelBuilder.Entity("Atomx.Common.Entities.Tag", b =>
{
b.Property<long>("Id")

View File

@@ -106,6 +106,7 @@ namespace Atomx.Data.Migrations
ParentId = table.Column<long>(type: "bigint", nullable: false),
Name = table.Column<string>(type: "varchar(256)", nullable: false),
Initial = table.Column<string>(type: "varchar(1)", nullable: false),
Abbreviation = table.Column<string>(type: "varchar(32)", nullable: false),
Depth = table.Column<int>(type: "integer", nullable: false),
Path = table.Column<string>(type: "varchar(100)", nullable: false),
AllowShipping = table.Column<bool>(type: "boolean", nullable: false),
@@ -654,23 +655,6 @@ namespace Atomx.Data.Migrations
table.PrimaryKey("PK_SpecificationAttributes", x => x.Id);
});
migrationBuilder.CreateTable(
name: "StateProvinces",
columns: table => new
{
Id = table.Column<long>(type: "bigint", nullable: false),
Name = table.Column<string>(type: "varchar(256)", nullable: false),
CountryId = table.Column<long>(type: "bigint", nullable: false),
Initial = table.Column<string>(type: "varchar(1)", nullable: false),
Abbreviation = table.Column<string>(type: "varchar(32)", nullable: false),
Enabled = table.Column<bool>(type: "boolean", nullable: false),
DisplayOrder = table.Column<int>(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_StateProvinces", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Tags",
columns: table => new
@@ -825,9 +809,6 @@ namespace Atomx.Data.Migrations
migrationBuilder.DropTable(
name: "SpecificationAttributes");
migrationBuilder.DropTable(
name: "StateProvinces");
migrationBuilder.DropTable(
name: "Tags");

View File

@@ -236,6 +236,10 @@ namespace Atomx.Data.Migrations
b.Property<long>("Id")
.HasColumnType("bigint");
b.Property<string>("Abbreviation")
.IsRequired()
.HasColumnType("varchar(32)");
b.Property<bool>("AllowShipping")
.HasColumnType("boolean");
@@ -1379,37 +1383,6 @@ namespace Atomx.Data.Migrations
b.ToTable("SpecificationAttributeOptions");
});
modelBuilder.Entity("Atomx.Common.Entities.StateProvince", b =>
{
b.Property<long>("Id")
.HasColumnType("bigint");
b.Property<string>("Abbreviation")
.IsRequired()
.HasColumnType("varchar(32)");
b.Property<long>("CountryId")
.HasColumnType("bigint");
b.Property<int>("DisplayOrder")
.HasColumnType("integer");
b.Property<bool>("Enabled")
.HasColumnType("boolean");
b.Property<string>("Initial")
.IsRequired()
.HasColumnType("varchar(1)");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("varchar(256)");
b.HasKey("Id");
b.ToTable("StateProvinces");
});
modelBuilder.Entity("Atomx.Common.Entities.Tag", b =>
{
b.Property<long>("Id")