mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
feat(dir): ✨ add unique idx on aggregate root names
This commit is contained in:
parent
3990af9f26
commit
b62654ee2a
9 changed files with 21 additions and 3 deletions
|
|
@ -36,6 +36,8 @@ internal class FilterListTypeConfiguration : IEntityTypeConfiguration<FilterList
|
|||
{
|
||||
public virtual void Configure(EntityTypeBuilder<FilterList> builder)
|
||||
{
|
||||
builder.HasIndex(f => f.Name)
|
||||
.IsUnique();
|
||||
builder.HasDataJsonFile<FilterList>();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,9 +18,12 @@ internal class FilterListViewUrlConfiguration : IEntityTypeConfiguration<FilterL
|
|||
public virtual void Configure(EntityTypeBuilder<FilterListViewUrl> builder)
|
||||
{
|
||||
builder.ToTable(nameof(FilterListViewUrl) + "s");
|
||||
builder.Property(u => u.SegmentNumber).HasDefaultValue(1);
|
||||
builder.Property(u => u.Primariness).HasDefaultValue(1);
|
||||
builder.HasIndex(u => new { u.FilterListId, u.SegmentNumber, u.Primariness }).IsUnique();
|
||||
builder.Property(u => u.SegmentNumber)
|
||||
.HasDefaultValue(1);
|
||||
builder.Property(u => u.Primariness)
|
||||
.HasDefaultValue(1);
|
||||
builder.HasIndex(u => new { u.FilterListId, u.SegmentNumber, u.Primariness })
|
||||
.IsUnique();
|
||||
builder.HasDataJsonFile<FilterListViewUrl>();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ public virtual void Configure(EntityTypeBuilder<Language> builder)
|
|||
builder.Property(l => l.Iso6391)
|
||||
.IsFixedLength()
|
||||
.HasMaxLength(2);
|
||||
builder.HasIndex(l => l.Name)
|
||||
.IsUnique();
|
||||
builder.HasDataJsonFile<Language>();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ internal class LicenseTypeConfiguration : IEntityTypeConfiguration<License>
|
|||
{
|
||||
public virtual void Configure(EntityTypeBuilder<License> builder)
|
||||
{
|
||||
builder.HasIndex(l => l.Name)
|
||||
.IsUnique();
|
||||
builder.HasDataJsonFile<License>();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ internal class MaintainerTypeConfiguration : IEntityTypeConfiguration<Maintainer
|
|||
{
|
||||
public virtual void Configure(EntityTypeBuilder<Maintainer> builder)
|
||||
{
|
||||
builder.HasIndex(m => m.Name)
|
||||
.IsUnique();
|
||||
builder.HasDataJsonFile<Maintainer>();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ internal class SoftwareTypeConfiguration : IEntityTypeConfiguration<Software>
|
|||
{
|
||||
public virtual void Configure(EntityTypeBuilder<Software> builder)
|
||||
{
|
||||
builder.HasIndex(s => s.Name)
|
||||
.IsUnique();
|
||||
builder.HasDataJsonFile<Software>();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ internal class SyntaxTypeConfiguration : IEntityTypeConfiguration<Syntax>
|
|||
{
|
||||
public virtual void Configure(EntityTypeBuilder<Syntax> builder)
|
||||
{
|
||||
builder.HasIndex(s => s.Name)
|
||||
.IsUnique();
|
||||
builder.HasDataJsonFile<Syntax>();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@ internal class TagTypeConfiguration : IEntityTypeConfiguration<Tag>
|
|||
{
|
||||
public virtual void Configure(EntityTypeBuilder<Tag> builder)
|
||||
{
|
||||
builder.HasIndex(t => t.Name)
|
||||
.IsUnique();
|
||||
builder.HasDataJsonFile<Tag>();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_ARGUMENTS_STYLE/@EntryValue">CHOP_IF_LONG</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_CHAINED_METHOD_CALLS/@EntryValue">CHOP_ALWAYS</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_PARAMETERS_STYLE/@EntryValue">CHOP_IF_LONG</s:String>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpKeepExistingMigration/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
|
||||
|
|
|
|||
Loading…
Reference in a new issue