From b073961ae7128e6118438841ae46e0d91613d156 Mon Sep 17 00:00:00 2001 From: sam <535915157@qq.com> Date: Fri, 12 Aug 2022 14:26:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3sqlite=E5=A4=A7=E5=B0=8F?= =?UTF-8?q?=E5=86=99=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IoTSharpDataBuilderExtensions.cs | 13 + ...12062443_CreateIdentitySchema.Designer.cs} | 666 ++++++++++++------ ...=> 20220812062443_CreateIdentitySchema.cs} | 440 ++++++------ .../ApplicationDbContextModelSnapshot.cs | 664 +++++++++++------ .../SqliteModelBuilderOptions.cs | 3 +- 5 files changed, 1122 insertions(+), 664 deletions(-) rename IoTSharp.Data.Sqlite/Migrations/{20220808144703_CreateIdentitySchema.Designer.cs => 20220812062443_CreateIdentitySchema.Designer.cs} (76%) rename IoTSharp.Data.Sqlite/Migrations/{20220808144703_CreateIdentitySchema.cs => 20220812062443_CreateIdentitySchema.cs} (89%) diff --git a/IoTSharp.Data.Sqlite/IoTSharpDataBuilderExtensions.cs b/IoTSharp.Data.Sqlite/IoTSharpDataBuilderExtensions.cs index d16fbaf8..ff14d961 100644 --- a/IoTSharp.Data.Sqlite/IoTSharpDataBuilderExtensions.cs +++ b/IoTSharp.Data.Sqlite/IoTSharpDataBuilderExtensions.cs @@ -5,6 +5,7 @@ using IoTSharp.Data.Sqlite; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; using System; +using System.Linq; namespace Microsoft.Extensions.DependencyInjection { @@ -32,5 +33,17 @@ namespace Microsoft.Extensions.DependencyInjection builder.AddDataSource(connectionString, ReadWriteType.Read | ReadWriteType.Write, DatabaseType.SQLite); builder.SetDateSharding(nameof(TelemetryData.DateTime), expandBy, DateTime.Now); } + + public static void SetCaseInsensitiveSearchesForSQLite(this ModelBuilder modelBuilder) + { + modelBuilder.UseCollation("NOCASE"); + + foreach (var property in modelBuilder.Model.GetEntityTypes() + .SelectMany(t => t.GetProperties()) + .Where(p => p.ClrType == typeof(string))) + { + property.SetCollation("NOCASE"); + } + } } } diff --git a/IoTSharp.Data.Sqlite/Migrations/20220808144703_CreateIdentitySchema.Designer.cs b/IoTSharp.Data.Sqlite/Migrations/20220812062443_CreateIdentitySchema.Designer.cs similarity index 76% rename from IoTSharp.Data.Sqlite/Migrations/20220808144703_CreateIdentitySchema.Designer.cs rename to IoTSharp.Data.Sqlite/Migrations/20220812062443_CreateIdentitySchema.Designer.cs index 4e70337d..114bf170 100644 --- a/IoTSharp.Data.Sqlite/Migrations/20220808144703_CreateIdentitySchema.Designer.cs +++ b/IoTSharp.Data.Sqlite/Migrations/20220812062443_CreateIdentitySchema.Designer.cs @@ -11,13 +11,15 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; namespace IoTSharp.Data.Sqlite.Migrations { [DbContext(typeof(ApplicationDbContext))] - [Migration("20220808144703_CreateIdentitySchema")] + [Migration("20220812062443_CreateIdentitySchema")] partial class CreateIdentitySchema { protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "6.0.7"); + modelBuilder + .UseCollation("NOCASE") + .HasAnnotation("ProductVersion", "6.0.7"); modelBuilder.Entity("IoTSharp.Data.Alarm", b => { @@ -29,13 +31,15 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("AlarmDetail") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("AlarmStatus") .HasColumnType("INTEGER"); b.Property("AlarmType") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ClearDateTime") .HasColumnType("TEXT"); @@ -80,16 +84,19 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("AssetType") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("CustomerId") .HasColumnType("TEXT"); b.Property("Description") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Name") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("TenantId") .HasColumnType("TEXT"); @@ -116,16 +123,19 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("INTEGER"); b.Property("Description") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("DeviceId") .HasColumnType("TEXT"); b.Property("KeyName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Name") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("Id"); @@ -141,13 +151,16 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("ActionData") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ActionName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ActionResult") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ActiveDateTime") .HasColumnType("TEXT"); @@ -159,7 +172,8 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("ObjectName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ObjectType") .HasColumnType("INTEGER"); @@ -168,10 +182,12 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("UserId") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("UserName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("Id"); @@ -189,13 +205,15 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("AuthToken") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("CustomerId") .HasColumnType("TEXT"); b.Property("Name") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("TenantId") .HasColumnType("TEXT"); @@ -216,40 +234,49 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("INTEGER"); b.Property("Dictionary18NKeyName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("DictionaryColor") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("DictionaryDesc") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("DictionaryGroupId") .HasColumnType("INTEGER"); b.Property("DictionaryIcon") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("DictionaryName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("DictionaryPattern") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("DictionaryStatus") .HasColumnType("INTEGER"); b.Property("DictionaryTag") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("DictionaryValue") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("DictionaryValueType") .HasColumnType("INTEGER"); b.Property("DictionaryValueTypeName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("DictionaryId"); @@ -263,16 +290,20 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("INTEGER"); b.Property("DictionaryGroup18NKeyName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("DictionaryGroupDesc") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("DictionaryGroupKey") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("DictionaryGroupName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("DictionaryGroupStatus") .HasColumnType("INTEGER"); @@ -281,7 +312,8 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("INTEGER"); b.Property("DictionaryGroupValueTypeName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("DictionaryGroupId"); @@ -295,10 +327,12 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("BizData") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Bizid") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("CreaterDateTime") .HasColumnType("TEXT"); @@ -310,10 +344,12 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("EventDesc") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("EventName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("EventStaus") .HasColumnType("INTEGER"); @@ -322,7 +358,8 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("MataData") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("TenantId") .HasColumnType("TEXT"); @@ -351,10 +388,12 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("KeyName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ResouceDesc") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ResouceGroupId") .HasColumnType("INTEGER"); @@ -363,10 +402,12 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("INTEGER"); b.Property("ResourceKey") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ResourceTag") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ResourceType") .HasColumnType("INTEGER"); @@ -378,85 +419,112 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("ValueBG") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueCS") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueDA") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueDEDE") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueELGR") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueENGR") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueENUS") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueESES") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueFI") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueFRFR") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueHE") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueHRHR") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueHU") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueITIT") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueJAJP") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueKOKR") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueNL") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValuePLPL") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValuePT") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueSLSL") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueSR") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueSV") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueTRTR") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueUK") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueVI") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueZHCN") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueZHTW") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("Id"); @@ -470,28 +538,36 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("Address") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("City") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Country") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Email") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Name") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Phone") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Province") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Street") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("TenantId") .HasColumnType("TEXT"); @@ -518,7 +594,8 @@ namespace IoTSharp.Data.Sqlite.Migrations b.Property("KeyName") .HasColumnType("TEXT") - .HasColumnOrder(2); + .HasColumnOrder(2) + .UseCollation("NOCASE"); b.Property("DataSide") .HasColumnType("INTEGER") @@ -545,16 +622,19 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("REAL"); b.Property("Value_Json") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Value_Long") .HasColumnType("INTEGER"); b.Property("Value_String") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Value_XML") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("Catalog", "DeviceId", "KeyName"); @@ -589,7 +669,8 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("Name") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Online") .HasColumnType("INTEGER"); @@ -639,13 +720,16 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("DiagramDesc") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("DiagramImage") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("DiagramName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("DiagramStatus") .HasColumnType("INTEGER"); @@ -687,10 +771,12 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("GraphElementId") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("GraphFill") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("GraphHeight") .HasColumnType("INTEGER"); @@ -702,22 +788,27 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("INTEGER"); b.Property("GraphShape") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("GraphStroke") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("GraphStrokeWidth") .HasColumnType("INTEGER"); b.Property("GraphTextAnchor") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("GraphTextFill") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("GraphTextFontFamily") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("GraphTextFontSize") .HasColumnType("INTEGER"); @@ -729,7 +820,8 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("INTEGER"); b.Property("GraphTextVerticalAnchor") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("GraphWidth") .HasColumnType("INTEGER"); @@ -755,10 +847,12 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("CommondParam") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("CommondType") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("CreateDate") .HasColumnType("TEXT"); @@ -776,10 +870,12 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("ToolBoxIcon") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ToolBoxName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ToolBoxOffsetLeftPer") .HasColumnType("INTEGER"); @@ -794,13 +890,15 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("INTEGER"); b.Property("ToolBoxRequestUri") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ToolBoxStatus") .HasColumnType("INTEGER"); b.Property("ToolBoxType") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("ToolBoxId"); @@ -822,13 +920,15 @@ namespace IoTSharp.Data.Sqlite.Migrations b.Property("IdentityId") .IsRequired() - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("IdentityType") .HasColumnType("INTEGER"); b.Property("IdentityValue") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("Id"); @@ -851,10 +951,12 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("ModelDesc") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ModelName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ModelStatus") .HasColumnType("INTEGER"); @@ -871,22 +973,27 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("CommandI18N") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("CommandName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("CommandParams") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("CommandStatus") .HasColumnType("INTEGER"); b.Property("CommandTemplate") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("CommandTitle") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("CommandType") .HasColumnType("INTEGER"); @@ -923,19 +1030,23 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("PortDesc") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("PortElementId") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("PortName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("PortPhyType") .HasColumnType("INTEGER"); b.Property("PortPic") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("PortStatus") .HasColumnType("INTEGER"); @@ -970,19 +1081,23 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("SourceElementId") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("SourceId") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("TargeId") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("TargetDeviceId") .HasColumnType("TEXT"); b.Property("TargetElementId") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("MappingId"); @@ -1032,7 +1147,8 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("FieldCode") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("FieldCreateDate") .HasColumnType("TEXT"); @@ -1041,19 +1157,23 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("FieldI18nKey") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("FieldMaxLength") .HasColumnType("INTEGER"); b.Property("FieldName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("FieldPattern") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("FieldPocoTypeName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("FieldStatus") .HasColumnType("INTEGER"); @@ -1062,25 +1182,31 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("INTEGER"); b.Property("FieldUIElementSchema") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("FieldUnit") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("FieldValue") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("FieldValueDataSource") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("FieldValueLocalDataSource") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("FieldValueType") .HasColumnType("INTEGER"); b.Property("FieldValueTypeName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("FormId") .HasColumnType("INTEGER"); @@ -1119,7 +1245,8 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("FieldCode") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("FieldCreateDate") .HasColumnType("TEXT"); @@ -1128,13 +1255,16 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("INTEGER"); b.Property("FieldName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("FieldUnit") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("FieldValue") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("FieldValueType") .HasColumnType("INTEGER"); @@ -1173,16 +1303,20 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("INTEGER"); b.Property("FormDesc") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("FormLayout") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("FormName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("FormSchame") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("FormStatus") .HasColumnType("INTEGER"); @@ -1194,13 +1328,15 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("INTEGER"); b.Property("ModelClass") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("TenantId") .HasColumnType("TEXT"); b.Property("Url") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("FormId"); @@ -1218,7 +1354,8 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("Conditionexpression") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("CreateDate") .HasColumnType("TEXT"); @@ -1242,46 +1379,60 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("INTEGER"); b.Property("FlowType") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Flowdesc") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Flowname") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Incoming") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("NodeProcessClass") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("NodeProcessMethod") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("NodeProcessParams") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("NodeProcessScript") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("NodeProcessScriptType") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("NodeProcessType") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ObjectId") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Outgoing") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("SourceId") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("TargetId") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("TenantId") .HasColumnType("TEXT"); @@ -1296,7 +1447,8 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("bpmnid") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("FlowId"); @@ -1324,10 +1476,12 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("BizId") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Data") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("FlowId") .HasColumnType("TEXT"); @@ -1339,16 +1493,19 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("INTEGER"); b.Property("OperationDesc") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Step") .HasColumnType("INTEGER"); b.Property("Tag") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("bpmnid") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("OperationId"); @@ -1374,32 +1531,38 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("Creator") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("CustomerId") .HasColumnType("TEXT"); b.Property("DefinitionsXml") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Describes") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ExecutableCode") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("MountType") .HasColumnType("INTEGER"); b.Property("Name") .IsRequired() - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ParentRuleId") .HasColumnType("TEXT"); b.Property("RuleDesc") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("RuleStatus") .HasColumnType("INTEGER"); @@ -1408,7 +1571,8 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("INTEGER"); b.Property("Runner") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("SubVersion") .HasColumnType("REAL"); @@ -1447,13 +1611,16 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("INTEGER"); b.Property("JwtId") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Token") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("UserId") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("Id"); @@ -1472,7 +1639,8 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("IdentityUserId") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("TenantId") .HasColumnType("TEXT"); @@ -1504,25 +1672,31 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("DefaultConfig") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ExecutorDesc") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ExecutorName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ExecutorStatus") .HasColumnType("INTEGER"); b.Property("MataData") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Path") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Tag") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("TenantId") .HasColumnType("TEXT"); @@ -1537,7 +1711,8 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("TypeName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("ExecutorId"); @@ -1564,22 +1739,27 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("EventDesc") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("EventName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("EventNameSpace") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("EventParam") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("EventStatus") .HasColumnType("INTEGER"); b.Property("EventTag") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("TenantId") .HasColumnType("TEXT"); @@ -1615,7 +1795,8 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("TaskConfig") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("BindId"); @@ -1634,7 +1815,8 @@ namespace IoTSharp.Data.Sqlite.Migrations b.Property("KeyName") .HasColumnType("TEXT") - .HasColumnOrder(2); + .HasColumnOrder(2) + .UseCollation("NOCASE"); b.Property("DateTime") .HasColumnType("TEXT") @@ -1661,16 +1843,19 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("REAL"); b.Property("Value_Json") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Value_Long") .HasColumnType("INTEGER"); b.Property("Value_String") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Value_XML") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("DeviceId", "KeyName", "DateTime"); @@ -1690,28 +1875,36 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("Address") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("City") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Country") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("EMail") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Name") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Phone") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Province") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Street") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ZipCode") .HasColumnType("INTEGER"); @@ -1724,19 +1917,23 @@ namespace IoTSharp.Data.Sqlite.Migrations modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => { b.Property("Id") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Name") .HasMaxLength(256) - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("NormalizedName") .HasMaxLength(256) - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("Id"); @@ -1754,14 +1951,17 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("INTEGER"); b.Property("ClaimType") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ClaimValue") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("RoleId") .IsRequired() - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("Id"); @@ -1773,18 +1973,21 @@ namespace IoTSharp.Data.Sqlite.Migrations modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b => { b.Property("Id") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("AccessFailedCount") .HasColumnType("INTEGER"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Email") .HasMaxLength(256) - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("EmailConfirmed") .HasColumnType("INTEGER"); @@ -1797,30 +2000,36 @@ namespace IoTSharp.Data.Sqlite.Migrations b.Property("NormalizedEmail") .HasMaxLength(256) - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("NormalizedUserName") .HasMaxLength(256) - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("PasswordHash") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("PhoneNumber") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("PhoneNumberConfirmed") .HasColumnType("INTEGER"); b.Property("SecurityStamp") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("TwoFactorEnabled") .HasColumnType("INTEGER"); b.Property("UserName") .HasMaxLength(256) - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("Id"); @@ -1841,14 +2050,17 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("INTEGER"); b.Property("ClaimType") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ClaimValue") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("UserId") .IsRequired() - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("Id"); @@ -1860,17 +2072,21 @@ namespace IoTSharp.Data.Sqlite.Migrations modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => { b.Property("LoginProvider") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ProviderKey") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ProviderDisplayName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("UserId") .IsRequired() - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("LoginProvider", "ProviderKey"); @@ -1882,10 +2098,12 @@ namespace IoTSharp.Data.Sqlite.Migrations modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => { b.Property("UserId") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("RoleId") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("UserId", "RoleId"); @@ -1897,16 +2115,20 @@ namespace IoTSharp.Data.Sqlite.Migrations modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => { b.Property("UserId") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("LoginProvider") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Name") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Value") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("UserId", "LoginProvider", "Name"); diff --git a/IoTSharp.Data.Sqlite/Migrations/20220808144703_CreateIdentitySchema.cs b/IoTSharp.Data.Sqlite/Migrations/20220812062443_CreateIdentitySchema.cs similarity index 89% rename from IoTSharp.Data.Sqlite/Migrations/20220808144703_CreateIdentitySchema.cs rename to IoTSharp.Data.Sqlite/Migrations/20220812062443_CreateIdentitySchema.cs index 03e33f72..1732305e 100644 --- a/IoTSharp.Data.Sqlite/Migrations/20220808144703_CreateIdentitySchema.cs +++ b/IoTSharp.Data.Sqlite/Migrations/20220812062443_CreateIdentitySchema.cs @@ -13,10 +13,10 @@ namespace IoTSharp.Data.Sqlite.Migrations name: "AspNetRoles", columns: table => new { - Id = table.Column(type: "TEXT", nullable: false), - Name = table.Column(type: "TEXT", maxLength: 256, nullable: true), - NormalizedName = table.Column(type: "TEXT", maxLength: 256, nullable: true), - ConcurrencyStamp = table.Column(type: "TEXT", nullable: true) + Id = table.Column(type: "TEXT", nullable: false, collation: "NOCASE"), + Name = table.Column(type: "TEXT", maxLength: 256, nullable: true, collation: "NOCASE"), + NormalizedName = table.Column(type: "TEXT", maxLength: 256, nullable: true, collation: "NOCASE"), + ConcurrencyStamp = table.Column(type: "TEXT", nullable: true, collation: "NOCASE") }, constraints: table => { @@ -27,16 +27,16 @@ namespace IoTSharp.Data.Sqlite.Migrations name: "AspNetUsers", columns: table => new { - Id = table.Column(type: "TEXT", nullable: false), - UserName = table.Column(type: "TEXT", maxLength: 256, nullable: true), - NormalizedUserName = table.Column(type: "TEXT", maxLength: 256, nullable: true), - Email = table.Column(type: "TEXT", maxLength: 256, nullable: true), - NormalizedEmail = table.Column(type: "TEXT", maxLength: 256, nullable: true), + Id = table.Column(type: "TEXT", nullable: false, collation: "NOCASE"), + UserName = table.Column(type: "TEXT", maxLength: 256, nullable: true, collation: "NOCASE"), + NormalizedUserName = table.Column(type: "TEXT", maxLength: 256, nullable: true, collation: "NOCASE"), + Email = table.Column(type: "TEXT", maxLength: 256, nullable: true, collation: "NOCASE"), + NormalizedEmail = table.Column(type: "TEXT", maxLength: 256, nullable: true, collation: "NOCASE"), EmailConfirmed = table.Column(type: "INTEGER", nullable: false), - PasswordHash = table.Column(type: "TEXT", nullable: true), - SecurityStamp = table.Column(type: "TEXT", nullable: true), - ConcurrencyStamp = table.Column(type: "TEXT", nullable: true), - PhoneNumber = table.Column(type: "TEXT", nullable: true), + PasswordHash = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + SecurityStamp = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + ConcurrencyStamp = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + PhoneNumber = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), PhoneNumberConfirmed = table.Column(type: "INTEGER", nullable: false), TwoFactorEnabled = table.Column(type: "INTEGER", nullable: false), LockoutEnd = table.Column(type: "TEXT", nullable: true), @@ -54,18 +54,18 @@ namespace IoTSharp.Data.Sqlite.Migrations { DictionaryId = table.Column(type: "INTEGER", nullable: false) .Annotation("Sqlite:Autoincrement", true), - DictionaryName = table.Column(type: "TEXT", nullable: true), - DictionaryValue = table.Column(type: "TEXT", nullable: true), - Dictionary18NKeyName = table.Column(type: "TEXT", nullable: true), + DictionaryName = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + DictionaryValue = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + Dictionary18NKeyName = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), DictionaryStatus = table.Column(type: "INTEGER", nullable: true), DictionaryValueType = table.Column(type: "INTEGER", nullable: true), - DictionaryValueTypeName = table.Column(type: "TEXT", nullable: true), + DictionaryValueTypeName = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), DictionaryGroupId = table.Column(type: "INTEGER", nullable: true), - DictionaryPattern = table.Column(type: "TEXT", nullable: true), - DictionaryDesc = table.Column(type: "TEXT", nullable: true), - DictionaryColor = table.Column(type: "TEXT", nullable: true), - DictionaryIcon = table.Column(type: "TEXT", nullable: true), - DictionaryTag = table.Column(type: "TEXT", nullable: true) + DictionaryPattern = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + DictionaryDesc = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + DictionaryColor = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + DictionaryIcon = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + DictionaryTag = table.Column(type: "TEXT", nullable: true, collation: "NOCASE") }, constraints: table => { @@ -78,13 +78,13 @@ namespace IoTSharp.Data.Sqlite.Migrations { DictionaryGroupId = table.Column(type: "INTEGER", nullable: false) .Annotation("Sqlite:Autoincrement", true), - DictionaryGroupName = table.Column(type: "TEXT", nullable: true), - DictionaryGroupKey = table.Column(type: "TEXT", nullable: true), + DictionaryGroupName = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + DictionaryGroupKey = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), DictionaryGroupValueType = table.Column(type: "INTEGER", nullable: true), DictionaryGroupStatus = table.Column(type: "INTEGER", nullable: true), - DictionaryGroupValueTypeName = table.Column(type: "TEXT", nullable: true), - DictionaryGroupDesc = table.Column(type: "TEXT", nullable: true), - DictionaryGroup18NKeyName = table.Column(type: "TEXT", nullable: true) + DictionaryGroupValueTypeName = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + DictionaryGroupDesc = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + DictionaryGroup18NKeyName = table.Column(type: "TEXT", nullable: true, collation: "NOCASE") }, constraints: table => { @@ -99,39 +99,39 @@ namespace IoTSharp.Data.Sqlite.Migrations .Annotation("Sqlite:Autoincrement", true), UserId = table.Column(type: "TEXT", nullable: false), Status = table.Column(type: "INTEGER", nullable: false), - KeyName = table.Column(type: "TEXT", nullable: true), - ValueBG = table.Column(type: "TEXT", nullable: true), - ValueCS = table.Column(type: "TEXT", nullable: true), - ValueDA = table.Column(type: "TEXT", nullable: true), - ValueDEDE = table.Column(type: "TEXT", nullable: true), - ValueESES = table.Column(type: "TEXT", nullable: true), - ValueENUS = table.Column(type: "TEXT", nullable: true), - ValueENGR = table.Column(type: "TEXT", nullable: true), - ValueELGR = table.Column(type: "TEXT", nullable: true), - ValueFI = table.Column(type: "TEXT", nullable: true), - ValueFRFR = table.Column(type: "TEXT", nullable: true), - ValueHE = table.Column(type: "TEXT", nullable: true), - ValueHRHR = table.Column(type: "TEXT", nullable: true), - ValueHU = table.Column(type: "TEXT", nullable: true), - ValueITIT = table.Column(type: "TEXT", nullable: true), - ValueJAJP = table.Column(type: "TEXT", nullable: true), - ValueKOKR = table.Column(type: "TEXT", nullable: true), - ValueNL = table.Column(type: "TEXT", nullable: true), - ValuePLPL = table.Column(type: "TEXT", nullable: true), - ValuePT = table.Column(type: "TEXT", nullable: true), - ValueSLSL = table.Column(type: "TEXT", nullable: true), - ValueTRTR = table.Column(type: "TEXT", nullable: true), - ValueSR = table.Column(type: "TEXT", nullable: true), - ValueSV = table.Column(type: "TEXT", nullable: true), - ValueUK = table.Column(type: "TEXT", nullable: true), - ValueVI = table.Column(type: "TEXT", nullable: true), - ValueZHCN = table.Column(type: "TEXT", nullable: true), - ValueZHTW = table.Column(type: "TEXT", nullable: true), + KeyName = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + ValueBG = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + ValueCS = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + ValueDA = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + ValueDEDE = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + ValueESES = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + ValueENUS = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + ValueENGR = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + ValueELGR = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + ValueFI = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + ValueFRFR = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + ValueHE = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + ValueHRHR = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + ValueHU = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + ValueITIT = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + ValueJAJP = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + ValueKOKR = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + ValueNL = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + ValuePLPL = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + ValuePT = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + ValueSLSL = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + ValueTRTR = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + ValueSR = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + ValueSV = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + ValueUK = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + ValueVI = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + ValueZHCN = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + ValueZHTW = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), ResourceType = table.Column(type: "INTEGER", nullable: true), ResourceId = table.Column(type: "INTEGER", nullable: true), - ResourceKey = table.Column(type: "TEXT", nullable: true), - ResourceTag = table.Column(type: "TEXT", nullable: true), - ResouceDesc = table.Column(type: "TEXT", nullable: true), + ResourceKey = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + ResourceTag = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + ResouceDesc = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), ResouceGroupId = table.Column(type: "INTEGER", nullable: true), AddDate = table.Column(type: "TEXT", nullable: true) }, @@ -146,17 +146,17 @@ namespace IoTSharp.Data.Sqlite.Migrations { Catalog = table.Column(type: "INTEGER", nullable: false), DeviceId = table.Column(type: "TEXT", nullable: false), - KeyName = table.Column(type: "TEXT", nullable: false), + KeyName = table.Column(type: "TEXT", nullable: false, collation: "NOCASE"), DateTime = table.Column(type: "TEXT", nullable: false), DataSide = table.Column(type: "INTEGER", nullable: false), Type = table.Column(type: "INTEGER", nullable: false), Value_Boolean = table.Column(type: "INTEGER", nullable: true), - Value_String = table.Column(type: "TEXT", nullable: true), + Value_String = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), Value_Long = table.Column(type: "INTEGER", nullable: true), Value_DateTime = table.Column(type: "TEXT", nullable: true), Value_Double = table.Column(type: "REAL", nullable: true), - Value_Json = table.Column(type: "TEXT", nullable: true), - Value_XML = table.Column(type: "TEXT", nullable: true), + Value_Json = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + Value_XML = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), Value_Binary = table.Column(type: "BLOB", nullable: true) }, constraints: table => @@ -169,8 +169,8 @@ namespace IoTSharp.Data.Sqlite.Migrations columns: table => new { DeviceModelId = table.Column(type: "TEXT", nullable: false), - ModelName = table.Column(type: "TEXT", nullable: true), - ModelDesc = table.Column(type: "TEXT", nullable: true), + ModelName = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + ModelDesc = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), ModelStatus = table.Column(type: "INTEGER", nullable: false), CreateDateTime = table.Column(type: "TEXT", nullable: false), Creator = table.Column(type: "TEXT", nullable: false) @@ -185,10 +185,10 @@ namespace IoTSharp.Data.Sqlite.Migrations columns: table => new { MappingId = table.Column(type: "TEXT", nullable: false), - SourceId = table.Column(type: "TEXT", nullable: true), - TargeId = table.Column(type: "TEXT", nullable: true), - SourceElementId = table.Column(type: "TEXT", nullable: true), - TargetElementId = table.Column(type: "TEXT", nullable: true), + SourceId = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + TargeId = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + SourceElementId = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + TargetElementId = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), CreateDate = table.Column(type: "TEXT", nullable: true), Creator = table.Column(type: "TEXT", nullable: false), MappingStatus = table.Column(type: "INTEGER", nullable: false), @@ -206,16 +206,16 @@ namespace IoTSharp.Data.Sqlite.Migrations columns: table => new { PortId = table.Column(type: "TEXT", nullable: false), - PortName = table.Column(type: "TEXT", nullable: true), - PortDesc = table.Column(type: "TEXT", nullable: true), - PortPic = table.Column(type: "TEXT", nullable: true), + PortName = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + PortDesc = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + PortPic = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), PortType = table.Column(type: "INTEGER", nullable: false), PortPhyType = table.Column(type: "INTEGER", nullable: false), PortStatus = table.Column(type: "INTEGER", nullable: false), DeviceId = table.Column(type: "TEXT", nullable: false), CreateDate = table.Column(type: "TEXT", nullable: true), Creator = table.Column(type: "INTEGER", nullable: false), - PortElementId = table.Column(type: "TEXT", nullable: true) + PortElementId = table.Column(type: "TEXT", nullable: true, collation: "NOCASE") }, constraints: table => { @@ -227,17 +227,17 @@ namespace IoTSharp.Data.Sqlite.Migrations columns: table => new { DeviceId = table.Column(type: "TEXT", nullable: false), - KeyName = table.Column(type: "TEXT", nullable: false), + KeyName = table.Column(type: "TEXT", nullable: false, collation: "NOCASE"), DateTime = table.Column(type: "TEXT", nullable: false), DataSide = table.Column(type: "INTEGER", nullable: false), Type = table.Column(type: "INTEGER", nullable: false), Value_Boolean = table.Column(type: "INTEGER", nullable: true), - Value_String = table.Column(type: "TEXT", nullable: true), + Value_String = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), Value_Long = table.Column(type: "INTEGER", nullable: true), Value_DateTime = table.Column(type: "TEXT", nullable: true), Value_Double = table.Column(type: "REAL", nullable: true), - Value_Json = table.Column(type: "TEXT", nullable: true), - Value_XML = table.Column(type: "TEXT", nullable: true), + Value_Json = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + Value_XML = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), Value_Binary = table.Column(type: "BLOB", nullable: true) }, constraints: table => @@ -250,14 +250,14 @@ namespace IoTSharp.Data.Sqlite.Migrations columns: table => new { Id = table.Column(type: "TEXT", nullable: false), - Name = table.Column(type: "TEXT", nullable: true), - EMail = table.Column(type: "TEXT", nullable: true), - Phone = table.Column(type: "TEXT", nullable: true), - Country = table.Column(type: "TEXT", nullable: true), - Province = table.Column(type: "TEXT", nullable: true), - City = table.Column(type: "TEXT", nullable: true), - Street = table.Column(type: "TEXT", nullable: true), - Address = table.Column(type: "TEXT", nullable: true), + Name = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + EMail = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + Phone = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + Country = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + Province = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + City = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + Street = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + Address = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), ZipCode = table.Column(type: "INTEGER", nullable: false) }, constraints: table => @@ -271,9 +271,9 @@ namespace IoTSharp.Data.Sqlite.Migrations { Id = table.Column(type: "INTEGER", nullable: false) .Annotation("Sqlite:Autoincrement", true), - RoleId = table.Column(type: "TEXT", nullable: false), - ClaimType = table.Column(type: "TEXT", nullable: true), - ClaimValue = table.Column(type: "TEXT", nullable: true) + RoleId = table.Column(type: "TEXT", nullable: false, collation: "NOCASE"), + ClaimType = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + ClaimValue = table.Column(type: "TEXT", nullable: true, collation: "NOCASE") }, constraints: table => { @@ -292,9 +292,9 @@ namespace IoTSharp.Data.Sqlite.Migrations { Id = table.Column(type: "INTEGER", nullable: false) .Annotation("Sqlite:Autoincrement", true), - UserId = table.Column(type: "TEXT", nullable: false), - ClaimType = table.Column(type: "TEXT", nullable: true), - ClaimValue = table.Column(type: "TEXT", nullable: true) + UserId = table.Column(type: "TEXT", nullable: false, collation: "NOCASE"), + ClaimType = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + ClaimValue = table.Column(type: "TEXT", nullable: true, collation: "NOCASE") }, constraints: table => { @@ -311,10 +311,10 @@ namespace IoTSharp.Data.Sqlite.Migrations name: "AspNetUserLogins", columns: table => new { - LoginProvider = table.Column(type: "TEXT", nullable: false), - ProviderKey = table.Column(type: "TEXT", nullable: false), - ProviderDisplayName = table.Column(type: "TEXT", nullable: true), - UserId = table.Column(type: "TEXT", nullable: false) + LoginProvider = table.Column(type: "TEXT", nullable: false, collation: "NOCASE"), + ProviderKey = table.Column(type: "TEXT", nullable: false, collation: "NOCASE"), + ProviderDisplayName = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + UserId = table.Column(type: "TEXT", nullable: false, collation: "NOCASE") }, constraints: table => { @@ -331,8 +331,8 @@ namespace IoTSharp.Data.Sqlite.Migrations name: "AspNetUserRoles", columns: table => new { - UserId = table.Column(type: "TEXT", nullable: false), - RoleId = table.Column(type: "TEXT", nullable: false) + UserId = table.Column(type: "TEXT", nullable: false, collation: "NOCASE"), + RoleId = table.Column(type: "TEXT", nullable: false, collation: "NOCASE") }, constraints: table => { @@ -355,10 +355,10 @@ namespace IoTSharp.Data.Sqlite.Migrations name: "AspNetUserTokens", columns: table => new { - UserId = table.Column(type: "TEXT", nullable: false), - LoginProvider = table.Column(type: "TEXT", nullable: false), - Name = table.Column(type: "TEXT", nullable: false), - Value = table.Column(type: "TEXT", nullable: true) + UserId = table.Column(type: "TEXT", nullable: false, collation: "NOCASE"), + LoginProvider = table.Column(type: "TEXT", nullable: false, collation: "NOCASE"), + Name = table.Column(type: "TEXT", nullable: false, collation: "NOCASE"), + Value = table.Column(type: "TEXT", nullable: true, collation: "NOCASE") }, constraints: table => { @@ -376,9 +376,9 @@ namespace IoTSharp.Data.Sqlite.Migrations columns: table => new { Id = table.Column(type: "TEXT", nullable: false), - UserId = table.Column(type: "TEXT", nullable: true), - Token = table.Column(type: "TEXT", nullable: true), - JwtId = table.Column(type: "TEXT", nullable: true), + UserId = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + Token = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + JwtId = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), IsUsed = table.Column(type: "INTEGER", nullable: false), IsRevorked = table.Column(type: "INTEGER", nullable: false), AddedDate = table.Column(type: "TEXT", nullable: false), @@ -399,12 +399,12 @@ namespace IoTSharp.Data.Sqlite.Migrations columns: table => new { CommandId = table.Column(type: "TEXT", nullable: false), - CommandTitle = table.Column(type: "TEXT", nullable: true), - CommandI18N = table.Column(type: "TEXT", nullable: true), + CommandTitle = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + CommandI18N = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), CommandType = table.Column(type: "INTEGER", nullable: false), - CommandParams = table.Column(type: "TEXT", nullable: true), - CommandName = table.Column(type: "TEXT", nullable: true), - CommandTemplate = table.Column(type: "TEXT", nullable: true), + CommandParams = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + CommandName = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + CommandTemplate = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), DeviceModelId = table.Column(type: "TEXT", nullable: false), CreateDateTime = table.Column(type: "TEXT", nullable: false), Creator = table.Column(type: "TEXT", nullable: false), @@ -426,14 +426,14 @@ namespace IoTSharp.Data.Sqlite.Migrations columns: table => new { Id = table.Column(type: "TEXT", nullable: false), - Name = table.Column(type: "TEXT", nullable: true), - Email = table.Column(type: "TEXT", nullable: true), - Phone = table.Column(type: "TEXT", nullable: true), - Country = table.Column(type: "TEXT", nullable: true), - Province = table.Column(type: "TEXT", nullable: true), - City = table.Column(type: "TEXT", nullable: true), - Street = table.Column(type: "TEXT", nullable: true), - Address = table.Column(type: "TEXT", nullable: true), + Name = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + Email = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + Phone = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + Country = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + Province = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + City = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + Street = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + Address = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), ZipCode = table.Column(type: "INTEGER", nullable: false), TenantId = table.Column(type: "TEXT", nullable: true) }, @@ -452,8 +452,8 @@ namespace IoTSharp.Data.Sqlite.Migrations columns: table => new { Id = table.Column(type: "TEXT", nullable: false), - AlarmType = table.Column(type: "TEXT", nullable: true), - AlarmDetail = table.Column(type: "TEXT", nullable: true), + AlarmType = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + AlarmDetail = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), AckDateTime = table.Column(type: "TEXT", nullable: false), ClearDateTime = table.Column(type: "TEXT", nullable: false), StartDateTime = table.Column(type: "TEXT", nullable: false), @@ -486,9 +486,9 @@ namespace IoTSharp.Data.Sqlite.Migrations columns: table => new { Id = table.Column(type: "TEXT", nullable: false), - Name = table.Column(type: "TEXT", nullable: true), - Description = table.Column(type: "TEXT", nullable: true), - AssetType = table.Column(type: "TEXT", nullable: true), + Name = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + Description = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + AssetType = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), CustomerId = table.Column(type: "TEXT", nullable: true), TenantId = table.Column(type: "TEXT", nullable: true) }, @@ -514,14 +514,14 @@ namespace IoTSharp.Data.Sqlite.Migrations Id = table.Column(type: "TEXT", nullable: false), TenantId = table.Column(type: "TEXT", nullable: true), CustomerId = table.Column(type: "TEXT", nullable: true), - UserId = table.Column(type: "TEXT", nullable: true), - UserName = table.Column(type: "TEXT", nullable: true), + UserId = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + UserName = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), ObjectID = table.Column(type: "TEXT", nullable: false), - ObjectName = table.Column(type: "TEXT", nullable: true), + ObjectName = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), ObjectType = table.Column(type: "INTEGER", nullable: false), - ActionName = table.Column(type: "TEXT", nullable: true), - ActionData = table.Column(type: "TEXT", nullable: true), - ActionResult = table.Column(type: "TEXT", nullable: true), + ActionName = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + ActionData = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + ActionResult = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), ActiveDateTime = table.Column(type: "TEXT", nullable: false) }, constraints: table => @@ -544,8 +544,8 @@ namespace IoTSharp.Data.Sqlite.Migrations columns: table => new { Id = table.Column(type: "TEXT", nullable: false), - Name = table.Column(type: "TEXT", nullable: true), - AuthToken = table.Column(type: "TEXT", nullable: true), + Name = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + AuthToken = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), TenantId = table.Column(type: "TEXT", nullable: true), CustomerId = table.Column(type: "TEXT", nullable: true) }, @@ -569,12 +569,12 @@ namespace IoTSharp.Data.Sqlite.Migrations columns: table => new { DiagramId = table.Column(type: "TEXT", nullable: false), - DiagramName = table.Column(type: "TEXT", nullable: true), - DiagramDesc = table.Column(type: "TEXT", nullable: true), + DiagramName = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + DiagramDesc = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), DiagramStatus = table.Column(type: "INTEGER", nullable: false), Creator = table.Column(type: "TEXT", nullable: false), CreateDate = table.Column(type: "TEXT", nullable: true), - DiagramImage = table.Column(type: "TEXT", nullable: true), + DiagramImage = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), IsDefault = table.Column(type: "INTEGER", nullable: false), TenantId = table.Column(type: "TEXT", nullable: true), CustomerId = table.Column(type: "TEXT", nullable: true) @@ -599,11 +599,11 @@ namespace IoTSharp.Data.Sqlite.Migrations columns: table => new { ToolBoxId = table.Column(type: "TEXT", nullable: false), - ToolBoxName = table.Column(type: "TEXT", nullable: true), - ToolBoxIcon = table.Column(type: "TEXT", nullable: true), + ToolBoxName = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + ToolBoxIcon = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), ToolBoxStatus = table.Column(type: "INTEGER", nullable: false), - ToolBoxRequestUri = table.Column(type: "TEXT", nullable: true), - ToolBoxType = table.Column(type: "TEXT", nullable: true), + ToolBoxRequestUri = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + ToolBoxType = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), DeviceId = table.Column(type: "INTEGER", nullable: false), ToolBoxOffsetX = table.Column(type: "INTEGER", nullable: false), ToolBoxOffsetY = table.Column(type: "INTEGER", nullable: false), @@ -611,8 +611,8 @@ namespace IoTSharp.Data.Sqlite.Migrations ToolBoxOffsetLeftPer = table.Column(type: "INTEGER", nullable: false), CreateDate = table.Column(type: "TEXT", nullable: true), Creator = table.Column(type: "TEXT", nullable: false), - CommondParam = table.Column(type: "TEXT", nullable: true), - CommondType = table.Column(type: "TEXT", nullable: true), + CommondParam = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + CommondType = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), TenantId = table.Column(type: "TEXT", nullable: true), CustomerId = table.Column(type: "TEXT", nullable: true) }, @@ -637,27 +637,27 @@ namespace IoTSharp.Data.Sqlite.Migrations { FieldId = table.Column(type: "INTEGER", nullable: false) .Annotation("Sqlite:Autoincrement", true), - FieldName = table.Column(type: "TEXT", nullable: true), - FieldValue = table.Column(type: "TEXT", nullable: true), + FieldName = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + FieldValue = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), FieldValueType = table.Column(type: "INTEGER", nullable: false), FormId = table.Column(type: "INTEGER", nullable: false), Creator = table.Column(type: "TEXT", nullable: false), FieldCreateDate = table.Column(type: "TEXT", nullable: true), FieldEditDate = table.Column(type: "TEXT", nullable: true), - FieldCode = table.Column(type: "TEXT", nullable: true), - FieldUnit = table.Column(type: "TEXT", nullable: true), + FieldCode = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + FieldUnit = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), IsRequired = table.Column(type: "INTEGER", nullable: false), IsEnabled = table.Column(type: "INTEGER", nullable: false), FieldStatus = table.Column(type: "INTEGER", nullable: false), - FieldI18nKey = table.Column(type: "TEXT", nullable: true), - FieldValueDataSource = table.Column(type: "TEXT", nullable: true), - FieldValueLocalDataSource = table.Column(type: "TEXT", nullable: true), - FieldPattern = table.Column(type: "TEXT", nullable: true), + FieldI18nKey = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + FieldValueDataSource = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + FieldValueLocalDataSource = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + FieldPattern = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), FieldMaxLength = table.Column(type: "INTEGER", nullable: false), - FieldValueTypeName = table.Column(type: "TEXT", nullable: true), + FieldValueTypeName = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), FieldUIElement = table.Column(type: "INTEGER", nullable: false), - FieldUIElementSchema = table.Column(type: "TEXT", nullable: true), - FieldPocoTypeName = table.Column(type: "TEXT", nullable: true), + FieldUIElementSchema = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + FieldPocoTypeName = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), TenantId = table.Column(type: "TEXT", nullable: true), CustomerId = table.Column(type: "TEXT", nullable: true) }, @@ -683,13 +683,13 @@ namespace IoTSharp.Data.Sqlite.Migrations FieldValueId = table.Column(type: "INTEGER", nullable: false) .Annotation("Sqlite:Autoincrement", true), FieldId = table.Column(type: "INTEGER", nullable: false), - FieldName = table.Column(type: "TEXT", nullable: true), - FieldValue = table.Column(type: "TEXT", nullable: true), + FieldName = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + FieldValue = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), FromId = table.Column(type: "INTEGER", nullable: false), Creator = table.Column(type: "TEXT", nullable: false), FieldCreateDate = table.Column(type: "TEXT", nullable: true), - FieldCode = table.Column(type: "TEXT", nullable: true), - FieldUnit = table.Column(type: "TEXT", nullable: true), + FieldCode = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + FieldUnit = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), FieldValueType = table.Column(type: "INTEGER", nullable: false), BizId = table.Column(type: "INTEGER", nullable: false), TenantId = table.Column(type: "TEXT", nullable: true), @@ -718,15 +718,15 @@ namespace IoTSharp.Data.Sqlite.Migrations .Annotation("Sqlite:Autoincrement", true), BizId = table.Column(type: "INTEGER", nullable: false), FormCreator = table.Column(type: "INTEGER", nullable: false), - FormName = table.Column(type: "TEXT", nullable: true), - FormDesc = table.Column(type: "TEXT", nullable: true), + FormName = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + FormDesc = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), FormStatus = table.Column(type: "INTEGER", nullable: false), - FormSchame = table.Column(type: "TEXT", nullable: true), - ModelClass = table.Column(type: "TEXT", nullable: true), - Url = table.Column(type: "TEXT", nullable: true), + FormSchame = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + ModelClass = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + Url = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), Creator = table.Column(type: "TEXT", nullable: false), FromCreateDate = table.Column(type: "TEXT", nullable: true), - FormLayout = table.Column(type: "TEXT", nullable: true), + FormLayout = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), IsCompact = table.Column(type: "INTEGER", nullable: false), TenantId = table.Column(type: "TEXT", nullable: true), CustomerId = table.Column(type: "TEXT", nullable: true) @@ -752,15 +752,15 @@ namespace IoTSharp.Data.Sqlite.Migrations { RuleId = table.Column(type: "TEXT", nullable: false), RuleType = table.Column(type: "INTEGER", nullable: false), - Name = table.Column(type: "TEXT", nullable: false), - Describes = table.Column(type: "TEXT", nullable: true), - Runner = table.Column(type: "TEXT", nullable: true), - ExecutableCode = table.Column(type: "TEXT", nullable: true), - Creator = table.Column(type: "TEXT", nullable: true), - RuleDesc = table.Column(type: "TEXT", nullable: true), + Name = table.Column(type: "TEXT", nullable: false, collation: "NOCASE"), + Describes = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + Runner = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + ExecutableCode = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + Creator = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + RuleDesc = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), RuleStatus = table.Column(type: "INTEGER", nullable: true), CreatTime = table.Column(type: "TEXT", nullable: true), - DefinitionsXml = table.Column(type: "TEXT", nullable: true), + DefinitionsXml = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), ParentRuleId = table.Column(type: "TEXT", nullable: false), SubVersion = table.Column(type: "REAL", nullable: false), Version = table.Column(type: "REAL", nullable: false), @@ -789,7 +789,7 @@ namespace IoTSharp.Data.Sqlite.Migrations columns: table => new { Id = table.Column(type: "TEXT", nullable: false), - IdentityUserId = table.Column(type: "TEXT", nullable: true), + IdentityUserId = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), TenantId = table.Column(type: "TEXT", nullable: true), CustomerId = table.Column(type: "TEXT", nullable: true) }, @@ -818,13 +818,13 @@ namespace IoTSharp.Data.Sqlite.Migrations columns: table => new { ExecutorId = table.Column(type: "TEXT", nullable: false), - ExecutorName = table.Column(type: "TEXT", nullable: true), - ExecutorDesc = table.Column(type: "TEXT", nullable: true), - Path = table.Column(type: "TEXT", nullable: true), - TypeName = table.Column(type: "TEXT", nullable: true), - DefaultConfig = table.Column(type: "TEXT", nullable: true), - MataData = table.Column(type: "TEXT", nullable: true), - Tag = table.Column(type: "TEXT", nullable: true), + ExecutorName = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + ExecutorDesc = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + Path = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + TypeName = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + DefaultConfig = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + MataData = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + Tag = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), ExecutorStatus = table.Column(type: "INTEGER", nullable: false), AddDateTime = table.Column(type: "TEXT", nullable: false), Creator = table.Column(type: "TEXT", nullable: false), @@ -854,13 +854,13 @@ namespace IoTSharp.Data.Sqlite.Migrations columns: table => new { EventId = table.Column(type: "TEXT", nullable: false), - EventName = table.Column(type: "TEXT", nullable: true), - EventDesc = table.Column(type: "TEXT", nullable: true), - EventNameSpace = table.Column(type: "TEXT", nullable: true), + EventName = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + EventDesc = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + EventNameSpace = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), EventStatus = table.Column(type: "INTEGER", nullable: false), Type = table.Column(type: "INTEGER", nullable: false), - EventParam = table.Column(type: "TEXT", nullable: true), - EventTag = table.Column(type: "TEXT", nullable: true), + EventParam = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + EventTag = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), CreateDateTime = table.Column(type: "TEXT", nullable: false), Creator = table.Column(type: "TEXT", nullable: false), TenantId = table.Column(type: "TEXT", nullable: true), @@ -886,11 +886,11 @@ namespace IoTSharp.Data.Sqlite.Migrations columns: table => new { Id = table.Column(type: "TEXT", nullable: false), - Name = table.Column(type: "TEXT", nullable: true), - Description = table.Column(type: "TEXT", nullable: true), + Name = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + Description = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), DeviceId = table.Column(type: "TEXT", nullable: false), DataCatalog = table.Column(type: "INTEGER", nullable: false), - KeyName = table.Column(type: "TEXT", nullable: true), + KeyName = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), AssetId = table.Column(type: "TEXT", nullable: true) }, constraints: table => @@ -908,7 +908,7 @@ namespace IoTSharp.Data.Sqlite.Migrations columns: table => new { Id = table.Column(type: "TEXT", nullable: false), - Name = table.Column(type: "TEXT", nullable: true), + Name = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), DeviceType = table.Column(type: "INTEGER", nullable: false), Online = table.Column(type: "INTEGER", nullable: false), LastActive = table.Column(type: "TEXT", nullable: false), @@ -956,24 +956,24 @@ namespace IoTSharp.Data.Sqlite.Migrations { GraphId = table.Column(type: "TEXT", nullable: false), DeviceId = table.Column(type: "TEXT", nullable: false), - GraphShape = table.Column(type: "TEXT", nullable: true), + GraphShape = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), GraphWidth = table.Column(type: "INTEGER", nullable: false), GraphHeight = table.Column(type: "INTEGER", nullable: false), GraphPostionX = table.Column(type: "INTEGER", nullable: false), GraphPostionY = table.Column(type: "INTEGER", nullable: false), - GraphElementId = table.Column(type: "TEXT", nullable: true), + GraphElementId = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), CreateDate = table.Column(type: "TEXT", nullable: true), Creator = table.Column(type: "TEXT", nullable: false), DeviceDiagramDiagramId = table.Column(type: "TEXT", nullable: true), - GraphFill = table.Column(type: "TEXT", nullable: true), - GraphStroke = table.Column(type: "TEXT", nullable: true), + GraphFill = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + GraphStroke = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), GraphStrokeWidth = table.Column(type: "INTEGER", nullable: false), - GraphTextFill = table.Column(type: "TEXT", nullable: true), + GraphTextFill = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), GraphTextFontSize = table.Column(type: "INTEGER", nullable: false), GraphTextRefX = table.Column(type: "INTEGER", nullable: false), - GraphTextAnchor = table.Column(type: "TEXT", nullable: true), - GraphTextVerticalAnchor = table.Column(type: "TEXT", nullable: true), - GraphTextFontFamily = table.Column(type: "TEXT", nullable: true), + GraphTextAnchor = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + GraphTextVerticalAnchor = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + GraphTextFontFamily = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), GraphTextRefY = table.Column(type: "INTEGER", nullable: false), TenantId = table.Column(type: "TEXT", nullable: true), CustomerId = table.Column(type: "TEXT", nullable: true) @@ -1003,16 +1003,16 @@ namespace IoTSharp.Data.Sqlite.Migrations columns: table => new { EventId = table.Column(type: "TEXT", nullable: false), - EventName = table.Column(type: "TEXT", nullable: true), - EventDesc = table.Column(type: "TEXT", nullable: true), + EventName = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + EventDesc = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), EventStaus = table.Column(type: "INTEGER", nullable: false), Type = table.Column(type: "INTEGER", nullable: false), - MataData = table.Column(type: "TEXT", nullable: true), + MataData = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), Creator = table.Column(type: "TEXT", nullable: false), FlowRuleRuleId = table.Column(type: "TEXT", nullable: true), - Bizid = table.Column(type: "TEXT", nullable: true), + Bizid = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), CreaterDateTime = table.Column(type: "TEXT", nullable: false), - BizData = table.Column(type: "TEXT", nullable: true), + BizData = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), TenantId = table.Column(type: "TEXT", nullable: true), CustomerId = table.Column(type: "TEXT", nullable: true) }, @@ -1041,23 +1041,23 @@ namespace IoTSharp.Data.Sqlite.Migrations columns: table => new { FlowId = table.Column(type: "TEXT", nullable: false), - bpmnid = table.Column(type: "TEXT", nullable: true), - Flowname = table.Column(type: "TEXT", nullable: true), + bpmnid = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + Flowname = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), FlowRuleRuleId = table.Column(type: "TEXT", nullable: true), - Flowdesc = table.Column(type: "TEXT", nullable: true), - ObjectId = table.Column(type: "TEXT", nullable: true), - FlowType = table.Column(type: "TEXT", nullable: true), - SourceId = table.Column(type: "TEXT", nullable: true), - TargetId = table.Column(type: "TEXT", nullable: true), - NodeProcessClass = table.Column(type: "TEXT", nullable: true), - Conditionexpression = table.Column(type: "TEXT", nullable: true), - NodeProcessMethod = table.Column(type: "TEXT", nullable: true), - NodeProcessParams = table.Column(type: "TEXT", nullable: true), - NodeProcessType = table.Column(type: "TEXT", nullable: true), - NodeProcessScriptType = table.Column(type: "TEXT", nullable: true), - NodeProcessScript = table.Column(type: "TEXT", nullable: true), - Incoming = table.Column(type: "TEXT", nullable: true), - Outgoing = table.Column(type: "TEXT", nullable: true), + Flowdesc = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + ObjectId = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + FlowType = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + SourceId = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + TargetId = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + NodeProcessClass = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + Conditionexpression = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + NodeProcessMethod = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + NodeProcessParams = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + NodeProcessType = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + NodeProcessScriptType = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + NodeProcessScript = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + Incoming = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + Outgoing = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), FlowStatus = table.Column(type: "INTEGER", nullable: false), TestStatus = table.Column(type: "INTEGER", nullable: false), Tester = table.Column(type: "TEXT", nullable: false), @@ -1103,7 +1103,7 @@ namespace IoTSharp.Data.Sqlite.Migrations SubscriptionEventId = table.Column(type: "TEXT", nullable: true), RuleTaskExecutorExecutorId = table.Column(type: "TEXT", nullable: true), Status = table.Column(type: "INTEGER", nullable: false), - TaskConfig = table.Column(type: "TEXT", nullable: true) + TaskConfig = table.Column(type: "TEXT", nullable: true, collation: "NOCASE") }, constraints: table => { @@ -1126,8 +1126,8 @@ namespace IoTSharp.Data.Sqlite.Migrations { Id = table.Column(type: "TEXT", nullable: false), IdentityType = table.Column(type: "INTEGER", nullable: false), - IdentityId = table.Column(type: "TEXT", nullable: false), - IdentityValue = table.Column(type: "TEXT", nullable: true), + IdentityId = table.Column(type: "TEXT", nullable: false, collation: "NOCASE"), + IdentityValue = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), DeviceId = table.Column(type: "TEXT", nullable: false) }, constraints: table => @@ -1174,15 +1174,15 @@ namespace IoTSharp.Data.Sqlite.Migrations OperationId = table.Column(type: "TEXT", nullable: false), AddDate = table.Column(type: "TEXT", nullable: true), NodeStatus = table.Column(type: "INTEGER", nullable: false), - OperationDesc = table.Column(type: "TEXT", nullable: true), - Data = table.Column(type: "TEXT", nullable: true), - BizId = table.Column(type: "TEXT", nullable: true), - bpmnid = table.Column(type: "TEXT", nullable: true), + OperationDesc = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + Data = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + BizId = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), + bpmnid = table.Column(type: "TEXT", nullable: true, collation: "NOCASE"), FlowId = table.Column(type: "TEXT", nullable: true), FlowRuleRuleId = table.Column(type: "TEXT", nullable: true), BaseEventEventId = table.Column(type: "TEXT", nullable: true), Step = table.Column(type: "INTEGER", nullable: false), - Tag = table.Column(type: "TEXT", nullable: true) + Tag = table.Column(type: "TEXT", nullable: true, collation: "NOCASE") }, constraints: table => { diff --git a/IoTSharp.Data.Sqlite/Migrations/ApplicationDbContextModelSnapshot.cs b/IoTSharp.Data.Sqlite/Migrations/ApplicationDbContextModelSnapshot.cs index 8d80e567..c0c89145 100644 --- a/IoTSharp.Data.Sqlite/Migrations/ApplicationDbContextModelSnapshot.cs +++ b/IoTSharp.Data.Sqlite/Migrations/ApplicationDbContextModelSnapshot.cs @@ -15,7 +15,9 @@ namespace IoTSharp.Data.Sqlite.Migrations protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "6.0.7"); + modelBuilder + .UseCollation("NOCASE") + .HasAnnotation("ProductVersion", "6.0.7"); modelBuilder.Entity("IoTSharp.Data.Alarm", b => { @@ -27,13 +29,15 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("AlarmDetail") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("AlarmStatus") .HasColumnType("INTEGER"); b.Property("AlarmType") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ClearDateTime") .HasColumnType("TEXT"); @@ -78,16 +82,19 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("AssetType") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("CustomerId") .HasColumnType("TEXT"); b.Property("Description") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Name") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("TenantId") .HasColumnType("TEXT"); @@ -114,16 +121,19 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("INTEGER"); b.Property("Description") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("DeviceId") .HasColumnType("TEXT"); b.Property("KeyName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Name") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("Id"); @@ -139,13 +149,16 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("ActionData") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ActionName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ActionResult") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ActiveDateTime") .HasColumnType("TEXT"); @@ -157,7 +170,8 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("ObjectName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ObjectType") .HasColumnType("INTEGER"); @@ -166,10 +180,12 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("UserId") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("UserName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("Id"); @@ -187,13 +203,15 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("AuthToken") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("CustomerId") .HasColumnType("TEXT"); b.Property("Name") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("TenantId") .HasColumnType("TEXT"); @@ -214,40 +232,49 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("INTEGER"); b.Property("Dictionary18NKeyName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("DictionaryColor") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("DictionaryDesc") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("DictionaryGroupId") .HasColumnType("INTEGER"); b.Property("DictionaryIcon") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("DictionaryName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("DictionaryPattern") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("DictionaryStatus") .HasColumnType("INTEGER"); b.Property("DictionaryTag") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("DictionaryValue") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("DictionaryValueType") .HasColumnType("INTEGER"); b.Property("DictionaryValueTypeName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("DictionaryId"); @@ -261,16 +288,20 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("INTEGER"); b.Property("DictionaryGroup18NKeyName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("DictionaryGroupDesc") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("DictionaryGroupKey") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("DictionaryGroupName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("DictionaryGroupStatus") .HasColumnType("INTEGER"); @@ -279,7 +310,8 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("INTEGER"); b.Property("DictionaryGroupValueTypeName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("DictionaryGroupId"); @@ -293,10 +325,12 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("BizData") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Bizid") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("CreaterDateTime") .HasColumnType("TEXT"); @@ -308,10 +342,12 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("EventDesc") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("EventName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("EventStaus") .HasColumnType("INTEGER"); @@ -320,7 +356,8 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("MataData") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("TenantId") .HasColumnType("TEXT"); @@ -349,10 +386,12 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("KeyName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ResouceDesc") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ResouceGroupId") .HasColumnType("INTEGER"); @@ -361,10 +400,12 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("INTEGER"); b.Property("ResourceKey") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ResourceTag") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ResourceType") .HasColumnType("INTEGER"); @@ -376,85 +417,112 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("ValueBG") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueCS") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueDA") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueDEDE") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueELGR") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueENGR") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueENUS") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueESES") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueFI") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueFRFR") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueHE") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueHRHR") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueHU") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueITIT") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueJAJP") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueKOKR") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueNL") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValuePLPL") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValuePT") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueSLSL") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueSR") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueSV") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueTRTR") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueUK") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueVI") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueZHCN") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ValueZHTW") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("Id"); @@ -468,28 +536,36 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("Address") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("City") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Country") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Email") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Name") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Phone") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Province") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Street") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("TenantId") .HasColumnType("TEXT"); @@ -516,7 +592,8 @@ namespace IoTSharp.Data.Sqlite.Migrations b.Property("KeyName") .HasColumnType("TEXT") - .HasColumnOrder(2); + .HasColumnOrder(2) + .UseCollation("NOCASE"); b.Property("DataSide") .HasColumnType("INTEGER") @@ -543,16 +620,19 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("REAL"); b.Property("Value_Json") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Value_Long") .HasColumnType("INTEGER"); b.Property("Value_String") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Value_XML") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("Catalog", "DeviceId", "KeyName"); @@ -587,7 +667,8 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("Name") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Online") .HasColumnType("INTEGER"); @@ -637,13 +718,16 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("DiagramDesc") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("DiagramImage") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("DiagramName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("DiagramStatus") .HasColumnType("INTEGER"); @@ -685,10 +769,12 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("GraphElementId") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("GraphFill") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("GraphHeight") .HasColumnType("INTEGER"); @@ -700,22 +786,27 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("INTEGER"); b.Property("GraphShape") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("GraphStroke") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("GraphStrokeWidth") .HasColumnType("INTEGER"); b.Property("GraphTextAnchor") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("GraphTextFill") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("GraphTextFontFamily") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("GraphTextFontSize") .HasColumnType("INTEGER"); @@ -727,7 +818,8 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("INTEGER"); b.Property("GraphTextVerticalAnchor") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("GraphWidth") .HasColumnType("INTEGER"); @@ -753,10 +845,12 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("CommondParam") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("CommondType") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("CreateDate") .HasColumnType("TEXT"); @@ -774,10 +868,12 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("ToolBoxIcon") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ToolBoxName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ToolBoxOffsetLeftPer") .HasColumnType("INTEGER"); @@ -792,13 +888,15 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("INTEGER"); b.Property("ToolBoxRequestUri") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ToolBoxStatus") .HasColumnType("INTEGER"); b.Property("ToolBoxType") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("ToolBoxId"); @@ -820,13 +918,15 @@ namespace IoTSharp.Data.Sqlite.Migrations b.Property("IdentityId") .IsRequired() - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("IdentityType") .HasColumnType("INTEGER"); b.Property("IdentityValue") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("Id"); @@ -849,10 +949,12 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("ModelDesc") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ModelName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ModelStatus") .HasColumnType("INTEGER"); @@ -869,22 +971,27 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("CommandI18N") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("CommandName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("CommandParams") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("CommandStatus") .HasColumnType("INTEGER"); b.Property("CommandTemplate") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("CommandTitle") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("CommandType") .HasColumnType("INTEGER"); @@ -921,19 +1028,23 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("PortDesc") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("PortElementId") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("PortName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("PortPhyType") .HasColumnType("INTEGER"); b.Property("PortPic") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("PortStatus") .HasColumnType("INTEGER"); @@ -968,19 +1079,23 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("SourceElementId") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("SourceId") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("TargeId") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("TargetDeviceId") .HasColumnType("TEXT"); b.Property("TargetElementId") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("MappingId"); @@ -1030,7 +1145,8 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("FieldCode") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("FieldCreateDate") .HasColumnType("TEXT"); @@ -1039,19 +1155,23 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("FieldI18nKey") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("FieldMaxLength") .HasColumnType("INTEGER"); b.Property("FieldName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("FieldPattern") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("FieldPocoTypeName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("FieldStatus") .HasColumnType("INTEGER"); @@ -1060,25 +1180,31 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("INTEGER"); b.Property("FieldUIElementSchema") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("FieldUnit") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("FieldValue") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("FieldValueDataSource") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("FieldValueLocalDataSource") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("FieldValueType") .HasColumnType("INTEGER"); b.Property("FieldValueTypeName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("FormId") .HasColumnType("INTEGER"); @@ -1117,7 +1243,8 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("FieldCode") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("FieldCreateDate") .HasColumnType("TEXT"); @@ -1126,13 +1253,16 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("INTEGER"); b.Property("FieldName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("FieldUnit") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("FieldValue") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("FieldValueType") .HasColumnType("INTEGER"); @@ -1171,16 +1301,20 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("INTEGER"); b.Property("FormDesc") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("FormLayout") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("FormName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("FormSchame") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("FormStatus") .HasColumnType("INTEGER"); @@ -1192,13 +1326,15 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("INTEGER"); b.Property("ModelClass") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("TenantId") .HasColumnType("TEXT"); b.Property("Url") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("FormId"); @@ -1216,7 +1352,8 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("Conditionexpression") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("CreateDate") .HasColumnType("TEXT"); @@ -1240,46 +1377,60 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("INTEGER"); b.Property("FlowType") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Flowdesc") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Flowname") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Incoming") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("NodeProcessClass") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("NodeProcessMethod") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("NodeProcessParams") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("NodeProcessScript") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("NodeProcessScriptType") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("NodeProcessType") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ObjectId") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Outgoing") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("SourceId") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("TargetId") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("TenantId") .HasColumnType("TEXT"); @@ -1294,7 +1445,8 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("bpmnid") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("FlowId"); @@ -1322,10 +1474,12 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("BizId") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Data") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("FlowId") .HasColumnType("TEXT"); @@ -1337,16 +1491,19 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("INTEGER"); b.Property("OperationDesc") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Step") .HasColumnType("INTEGER"); b.Property("Tag") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("bpmnid") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("OperationId"); @@ -1372,32 +1529,38 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("Creator") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("CustomerId") .HasColumnType("TEXT"); b.Property("DefinitionsXml") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Describes") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ExecutableCode") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("MountType") .HasColumnType("INTEGER"); b.Property("Name") .IsRequired() - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ParentRuleId") .HasColumnType("TEXT"); b.Property("RuleDesc") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("RuleStatus") .HasColumnType("INTEGER"); @@ -1406,7 +1569,8 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("INTEGER"); b.Property("Runner") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("SubVersion") .HasColumnType("REAL"); @@ -1445,13 +1609,16 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("INTEGER"); b.Property("JwtId") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Token") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("UserId") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("Id"); @@ -1470,7 +1637,8 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("IdentityUserId") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("TenantId") .HasColumnType("TEXT"); @@ -1502,25 +1670,31 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("DefaultConfig") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ExecutorDesc") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ExecutorName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ExecutorStatus") .HasColumnType("INTEGER"); b.Property("MataData") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Path") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Tag") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("TenantId") .HasColumnType("TEXT"); @@ -1535,7 +1709,8 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("TypeName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("ExecutorId"); @@ -1562,22 +1737,27 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("EventDesc") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("EventName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("EventNameSpace") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("EventParam") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("EventStatus") .HasColumnType("INTEGER"); b.Property("EventTag") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("TenantId") .HasColumnType("TEXT"); @@ -1613,7 +1793,8 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("TaskConfig") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("BindId"); @@ -1632,7 +1813,8 @@ namespace IoTSharp.Data.Sqlite.Migrations b.Property("KeyName") .HasColumnType("TEXT") - .HasColumnOrder(2); + .HasColumnOrder(2) + .UseCollation("NOCASE"); b.Property("DateTime") .HasColumnType("TEXT") @@ -1659,16 +1841,19 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("REAL"); b.Property("Value_Json") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Value_Long") .HasColumnType("INTEGER"); b.Property("Value_String") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Value_XML") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("DeviceId", "KeyName", "DateTime"); @@ -1688,28 +1873,36 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("TEXT"); b.Property("Address") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("City") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Country") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("EMail") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Name") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Phone") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Province") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Street") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ZipCode") .HasColumnType("INTEGER"); @@ -1722,19 +1915,23 @@ namespace IoTSharp.Data.Sqlite.Migrations modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => { b.Property("Id") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Name") .HasMaxLength(256) - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("NormalizedName") .HasMaxLength(256) - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("Id"); @@ -1752,14 +1949,17 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("INTEGER"); b.Property("ClaimType") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ClaimValue") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("RoleId") .IsRequired() - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("Id"); @@ -1771,18 +1971,21 @@ namespace IoTSharp.Data.Sqlite.Migrations modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b => { b.Property("Id") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("AccessFailedCount") .HasColumnType("INTEGER"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Email") .HasMaxLength(256) - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("EmailConfirmed") .HasColumnType("INTEGER"); @@ -1795,30 +1998,36 @@ namespace IoTSharp.Data.Sqlite.Migrations b.Property("NormalizedEmail") .HasMaxLength(256) - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("NormalizedUserName") .HasMaxLength(256) - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("PasswordHash") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("PhoneNumber") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("PhoneNumberConfirmed") .HasColumnType("INTEGER"); b.Property("SecurityStamp") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("TwoFactorEnabled") .HasColumnType("INTEGER"); b.Property("UserName") .HasMaxLength(256) - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("Id"); @@ -1839,14 +2048,17 @@ namespace IoTSharp.Data.Sqlite.Migrations .HasColumnType("INTEGER"); b.Property("ClaimType") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ClaimValue") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("UserId") .IsRequired() - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("Id"); @@ -1858,17 +2070,21 @@ namespace IoTSharp.Data.Sqlite.Migrations modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => { b.Property("LoginProvider") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ProviderKey") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("ProviderDisplayName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("UserId") .IsRequired() - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("LoginProvider", "ProviderKey"); @@ -1880,10 +2096,12 @@ namespace IoTSharp.Data.Sqlite.Migrations modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => { b.Property("UserId") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("RoleId") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("UserId", "RoleId"); @@ -1895,16 +2113,20 @@ namespace IoTSharp.Data.Sqlite.Migrations modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => { b.Property("UserId") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("LoginProvider") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Name") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.Property("Value") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .UseCollation("NOCASE"); b.HasKey("UserId", "LoginProvider", "Name"); diff --git a/IoTSharp.Data.Sqlite/SqliteModelBuilderOptions.cs b/IoTSharp.Data.Sqlite/SqliteModelBuilderOptions.cs index 979c57be..b487dd2c 100644 --- a/IoTSharp.Data.Sqlite/SqliteModelBuilderOptions.cs +++ b/IoTSharp.Data.Sqlite/SqliteModelBuilderOptions.cs @@ -1,6 +1,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using System; +using Microsoft.Extensions.DependencyInjection; namespace IoTSharp.Data.Sqlite { @@ -14,7 +15,7 @@ namespace IoTSharp.Data.Sqlite public void OnModelCreating(ModelBuilder modelBuilder) { - + modelBuilder.SetCaseInsensitiveSearchesForSQLite(); } } } \ No newline at end of file -- GitLab