mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
refactor(directory): ♻ convert SegmentNumber and Primariness to shorts
This commit is contained in:
parent
084112a266
commit
3545d7c162
4 changed files with 17 additions and 17 deletions
|
|
@ -10,7 +10,7 @@
|
|||
namespace FilterLists.Directory.Infrastructure.Migrations.Migrations
|
||||
{
|
||||
[DbContext(typeof(QueryDbContext))]
|
||||
[Migration("20200827222216_Initial")]
|
||||
[Migration("20200828001720_Initial")]
|
||||
partial class Initial
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
|
|
@ -355,15 +355,15 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|||
b1.Property<int>("FilterListId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b1.Property<int>("Primariness")
|
||||
b1.Property<short>("Primariness")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasDefaultValue(1);
|
||||
.HasColumnType("smallint")
|
||||
.HasDefaultValue((short)1);
|
||||
|
||||
b1.Property<int>("SegmentNumber")
|
||||
b1.Property<short>("SegmentNumber")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasDefaultValue(1);
|
||||
.HasColumnType("smallint")
|
||||
.HasDefaultValue((short)1);
|
||||
|
||||
b1.Property<string>("Url")
|
||||
.IsRequired()
|
||||
|
|
@ -276,8 +276,8 @@ protected override void Up(MigrationBuilder migrationBuilder)
|
|||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
SegmentNumber = table.Column<int>(nullable: false, defaultValue: 1),
|
||||
Primariness = table.Column<int>(nullable: false, defaultValue: 1),
|
||||
SegmentNumber = table.Column<short>(nullable: false, defaultValue: (short)1),
|
||||
Primariness = table.Column<short>(nullable: false, defaultValue: (short)1),
|
||||
Url = table.Column<string>(nullable: false),
|
||||
FilterListId = table.Column<int>(nullable: false)
|
||||
},
|
||||
|
|
@ -353,15 +353,15 @@ protected override void BuildModel(ModelBuilder modelBuilder)
|
|||
b1.Property<int>("FilterListId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b1.Property<int>("Primariness")
|
||||
b1.Property<short>("Primariness")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasDefaultValue(1);
|
||||
.HasColumnType("smallint")
|
||||
.HasDefaultValue((short)1);
|
||||
|
||||
b1.Property<int>("SegmentNumber")
|
||||
b1.Property<short>("SegmentNumber")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasDefaultValue(1);
|
||||
.HasColumnType("smallint")
|
||||
.HasDefaultValue((short)1);
|
||||
|
||||
b1.Property<string>("Url")
|
||||
.IsRequired()
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ namespace FilterLists.Directory.Infrastructure.Persistence.Queries.Entities
|
|||
{
|
||||
public class FilterListViewUrl
|
||||
{
|
||||
public int SegmentNumber { get; set; }
|
||||
public int Primariness { get; set; }
|
||||
public short SegmentNumber { get; set; }
|
||||
public short Primariness { get; set; }
|
||||
public Uri Url { get; set; } = null!;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue