diff --git a/src/OrchardCore.Build/Dependencies.props b/src/OrchardCore.Build/Dependencies.props index d28b768dd5b..fc473ecddcd 100644 --- a/src/OrchardCore.Build/Dependencies.props +++ b/src/OrchardCore.Build/Dependencies.props @@ -62,11 +62,11 @@ - - - - - + + + + + diff --git a/src/OrchardCore.Modules/OrchardCore.AdminDashboard/Migrations.cs b/src/OrchardCore.Modules/OrchardCore.AdminDashboard/Migrations.cs index 9b170a21f97..9ad363a81f6 100644 --- a/src/OrchardCore.Modules/OrchardCore.AdminDashboard/Migrations.cs +++ b/src/OrchardCore.Modules/OrchardCore.AdminDashboard/Migrations.cs @@ -29,7 +29,7 @@ public async Task CreateAsync() SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_DashboardPart_DocumentId", "DocumentId", - nameof(DashboardPartIndex.Position)) + "Position") ); _contentDefinitionManager.AlterPartDefinition("DashboardPart", builder => builder @@ -56,7 +56,7 @@ public int UpdateFrom2() SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_DashboardPart_DocumentId", "DocumentId", - nameof(DashboardPartIndex.Position)) + "Position") ); return 3; diff --git a/src/OrchardCore.Modules/OrchardCore.Alias/Migrations.cs b/src/OrchardCore.Modules/OrchardCore.Alias/Migrations.cs index b8d04afe59b..c56dc57bef9 100644 --- a/src/OrchardCore.Modules/OrchardCore.Alias/Migrations.cs +++ b/src/OrchardCore.Modules/OrchardCore.Alias/Migrations.cs @@ -22,9 +22,6 @@ public int Create() .Attachable() .WithDescription("Provides a way to define custom aliases for content items.")); - // NOTE: The Alias Length has been upgraded from 64 characters to 767. - // For existing SQL databases update the AliasPartIndex tables Alias column length manually. - // INFO: The Alias Length is now of 735 chars, but this is only used on a new installation. SchemaBuilder.CreateMapIndexTable(table => table .Column("Alias", col => col.WithLength(AliasPart.MaxAliasLength)) .Column("ContentItemId", c => c.WithLength(26)) diff --git a/src/OrchardCore.Modules/OrchardCore.ArchiveLater/Migrations.cs b/src/OrchardCore.Modules/OrchardCore.ArchiveLater/Migrations.cs index 6d053390601..d91c8bb49d0 100644 --- a/src/OrchardCore.Modules/OrchardCore.ArchiveLater/Migrations.cs +++ b/src/OrchardCore.Modules/OrchardCore.ArchiveLater/Migrations.cs @@ -3,7 +3,6 @@ using OrchardCore.ArchiveLater.Models; using OrchardCore.ContentManagement.Metadata; using OrchardCore.ContentManagement.Metadata.Settings; -using OrchardCore.ContentManagement.Records; using OrchardCore.Data.Migration; using YesSql.Sql; @@ -25,20 +24,20 @@ public int Create() .WithDescription("Adds the ability to schedule content items to be archived at a given future date and time.")); SchemaBuilder.CreateMapIndexTable(table => table - .Column(nameof(ArchiveLaterPartIndex.ContentItemId)) - .Column(nameof(ArchiveLaterPartIndex.ScheduledArchiveDateTimeUtc)) - .Column(nameof(ArchiveLaterPartIndex.Published)) - .Column(nameof(ArchiveLaterPartIndex.Latest)) + .Column("ContentItemId") + .Column("ScheduledArchiveDateTimeUtc") + .Column("Published") + .Column("Latest") ); SchemaBuilder.AlterIndexTable(table => table - .CreateIndex($"IDX_{nameof(ArchiveLaterPartIndex)}_{nameof(ContentItemIndex.DocumentId)}", + .CreateIndex("IDX_ArchiveLaterPartIndex_DocumentId", "Id", - nameof(ContentItemIndex.DocumentId), - nameof(ArchiveLaterPartIndex.ContentItemId), - nameof(ArchiveLaterPartIndex.ScheduledArchiveDateTimeUtc), - nameof(ArchiveLaterPartIndex.Published), - nameof(ArchiveLaterPartIndex.Latest)) + "DocumentId", + "ContentItemId", + "ScheduledArchiveDateTimeUtc", + "Published", + "Latest") ); return 1; diff --git a/src/OrchardCore.Modules/OrchardCore.AuditTrail/Migrations.cs b/src/OrchardCore.Modules/OrchardCore.AuditTrail/Migrations.cs index 1cd274604f7..8259cb40bce 100644 --- a/src/OrchardCore.Modules/OrchardCore.AuditTrail/Migrations.cs +++ b/src/OrchardCore.Modules/OrchardCore.AuditTrail/Migrations.cs @@ -23,13 +23,13 @@ public int Create() SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_AuditTrailEventIndex_DocumentId", "DocumentId", - nameof(AuditTrailEventIndex.EventId), - nameof(AuditTrailEventIndex.Category), - nameof(AuditTrailEventIndex.Name), - nameof(AuditTrailEventIndex.CorrelationId), - nameof(AuditTrailEventIndex.UserId), - nameof(AuditTrailEventIndex.NormalizedUserName), - nameof(AuditTrailEventIndex.CreatedUtc) + "EventId", + "Category", + "Name", + "CorrelationId", + "UserId", + "NormalizedUserName", + "CreatedUtc" ), collection: AuditTrailEvent.Collection ); diff --git a/src/OrchardCore.Modules/OrchardCore.ContentFields/Indexing/SQL/Migrations.cs b/src/OrchardCore.Modules/OrchardCore.ContentFields/Indexing/SQL/Migrations.cs index f2b565dbd76..2ed39e9b409 100644 --- a/src/OrchardCore.Modules/OrchardCore.ContentFields/Indexing/SQL/Migrations.cs +++ b/src/OrchardCore.Modules/OrchardCore.ContentFields/Indexing/SQL/Migrations.cs @@ -42,12 +42,14 @@ public int Create() "Latest") ); + // The index in MySQL can accommodate up to 768 characters or 3072 bytes. + // DocumentId (2) + ContentType (254) + ContentPart (254) + ContentField (254) + Published (1) + Latest (1) = 766 (less than 768) SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_TextFieldIndex_DocumentId_ContentType", "DocumentId", - "ContentType", - "ContentPart", - "ContentField", + "ContentType(254)", + "ContentPart(254)", + "ContentField(254)", "Published", "Latest") ); @@ -80,12 +82,14 @@ public int Create() "Latest") ); + // The index in MySQL can accommodate up to 768 characters or 3072 bytes. + // DocumentId (2) + ContentType (254) + ContentPart (254) + ContentField (254) + Boolean (1) + Published (1) + Latest (1) = 767 (less than 768) SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_BooleanFieldIndex_DocumentId_ContentType", "DocumentId", - "ContentType", - "ContentPart", - "ContentField", + "ContentType(254)", + "ContentPart(254)", + "ContentField(254)", "Boolean", "Published", "Latest") @@ -111,12 +115,14 @@ public int Create() "Latest") ); + // The index in MySQL can accommodate up to 768 characters or 3072 bytes. + // DocumentId (2) + ContentType (254) + ContentPart (254) + ContentField (254) + Published (1) + Latest (1) = 766 (less than 768) SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_NumericFieldIndex_DocumentId_ContentType", "DocumentId", - "ContentType", - "ContentPart", - "ContentField", + "ContentType(254)", + "ContentPart(254)", + "ContentField(254)", "Published", "Latest") ); @@ -149,12 +155,14 @@ public int Create() "Latest") ); + // The index in MySQL can accommodate up to 768 characters or 3072 bytes. + // DocumentId (2) + ContentType (254) + ContentPart (254) + ContentField (254) + Published (1) + Latest (1) = 766 (less than 768) SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_DateTimeFieldIndex_DocumentId_ContentType", "DocumentId", - "ContentType", - "ContentPart", - "ContentField", + "ContentType(254)", + "ContentPart(254)", + "ContentField(254)", "Published", "Latest") ); @@ -187,12 +195,14 @@ public int Create() "Latest") ); + // The index in MySQL can accommodate up to 768 characters or 3072 bytes. + // DocumentId (2) + ContentType (254) + ContentPart (254) + ContentField (254) + Published (1) + Latest (1) = 766 (less than 768) SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_DateFieldIndex_DocumentId_ContentType", "DocumentId", - "ContentType", - "ContentPart", - "ContentField", + "ContentType(254)", + "ContentPart(254)", + "ContentField(254)", "Published", "Latest") ); @@ -226,12 +236,14 @@ public int Create() "Latest") ); + // The index in MySQL can accommodate up to 768 characters or 3072 bytes. + // DocumentId (2) + ContentType (254) + ContentPart (254) + ContentField (254) + Published (1) + Latest (1) = 766 (less than 768) SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_ContentPickerFieldIndex_DocumentId_ContentType", "DocumentId", - "ContentType", - "ContentPart", - "ContentField", + "ContentType(254)", + "ContentPart(254)", + "ContentField(254)", "Published", "Latest") ); @@ -264,12 +276,14 @@ public int Create() "Latest") ); + // The index in MySQL can accommodate up to 768 characters or 3072 bytes. + // DocumentId (2) + ContentType (254) + ContentPart (254) + ContentField (254) + Published (1) + Latest (1) = 766 (less than 768) SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_TimeFieldIndex_DocumentId_ContentType", "DocumentId", - "ContentType", - "ContentPart", - "ContentField", + "ContentType(254)", + "ContentPart(254)", + "ContentField(254)", "Published", "Latest") ); @@ -309,12 +323,15 @@ public int Create() "Latest") ); + + // The index in MySQL can accommodate up to 768 characters or 3072 bytes. + // DocumentId (2) + ContentType (254) + ContentPart (254) + ContentField (254) + Published (1) + Latest (1) = 766 (less than 768) SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_LinkFieldIndex_DocumentId_ContentType", "DocumentId", - "ContentType", - "ContentPart", - "ContentField", + "ContentType(254)", + "ContentPart(254)", + "ContentField(254)", "Published", "Latest") ); @@ -355,12 +372,14 @@ public int Create() "Latest") ); + // The index in MySQL can accommodate up to 768 characters or 3072 bytes. + // DocumentId (2) + ContentType (254) + ContentPart (254) + ContentField (254) + Published (1) + Latest (1) = 766 (less than 768) SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_HtmlFieldIndex_DocumentId_ContentType", "DocumentId", - "ContentType", - "ContentPart", - "ContentField", + "ContentType(254)", + "ContentPart(254)", + "ContentField(254)", "Published", "Latest") ); @@ -386,12 +405,14 @@ public int Create() "Latest") ); + // The index in MySQL can accommodate up to 768 characters or 3072 bytes. + // DocumentId (2) + ContentType (254) + ContentPart (254) + ContentField (254) + Published (1) + Latest (1) = 766 (less than 768) SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_MultiTextFieldIndex_DocumentId_ContentType", "DocumentId", - "ContentType", - "ContentPart", - "ContentField", + "ContentType(254)", + "ContentPart(254)", + "ContentField(254)", "Published", "Latest") ); @@ -450,12 +471,14 @@ public int UpdateFrom3() "Latest") ); + // The index in MySQL can accommodate up to 768 characters or 3072 bytes. + // DocumentId (2) + ContentType (254) + ContentPart (254) + ContentField (254) + Published (1) + Latest (1) = 766 (less than 768) SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_TextFieldIndex_DocumentId_ContentType", "DocumentId", - "ContentType", - "ContentPart", - "ContentField", + "ContentType(254)", + "ContentPart(254)", + "ContentField(254)", "Published", "Latest") ); @@ -478,12 +501,14 @@ public int UpdateFrom3() "Latest") ); + // The index in MySQL can accommodate up to 768 characters or 3072 bytes. + // DocumentId (2) + ContentType (254) + ContentPart (254) + ContentField (254) + Published (1) + Latest (1) = 766 (less than 768) SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_BooleanFieldIndex_DocumentId_ContentType", "DocumentId", - "ContentType", - "ContentPart", - "ContentField", + "ContentType(254)", + "ContentPart(254)", + "ContentField(254)", "Boolean", "Published", "Latest") @@ -498,12 +523,14 @@ public int UpdateFrom3() "Latest") ); + // The index in MySQL can accommodate up to 768 characters or 3072 bytes. + // DocumentId (2) + ContentType (254) + ContentPart (254) + ContentField (254) + Published (1) + Latest (1) = 766 (less than 768) SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_NumericFieldIndex_DocumentId_ContentType", "DocumentId", - "ContentType", - "ContentPart", - "ContentField", + "ContentType(254)", + "ContentPart(254)", + "ContentField(254)", "Published", "Latest") ); @@ -525,12 +552,14 @@ public int UpdateFrom3() "Latest") ); + // The index in MySQL can accommodate up to 768 characters or 3072 bytes. + // DocumentId (2) + ContentType (254) + ContentPart (254) + ContentField (254) + Published (1) + Latest (1) = 766 (less than 768) SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_DateTimeFieldIndex_DocumentId_ContentType", "DocumentId", - "ContentType", - "ContentPart", - "ContentField", + "ContentType(254)", + "ContentPart(254)", + "ContentField(254)", "Published", "Latest") ); @@ -552,12 +581,14 @@ public int UpdateFrom3() "Latest") ); + // The index in MySQL can accommodate up to 768 characters or 3072 bytes. + // DocumentId (2) + ContentType (254) + ContentPart (254) + ContentField (254) + Published (1) + Latest (1) = 766 (less than 768) SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_DateFieldIndex_DocumentId_ContentType", "DocumentId", - "ContentType", - "ContentPart", - "ContentField", + "ContentType(254)", + "ContentPart(254)", + "ContentField(254)", "Published", "Latest") ); @@ -579,12 +610,14 @@ public int UpdateFrom3() "Latest") ); + // The index in MySQL can accommodate up to 768 characters or 3072 bytes. + // DocumentId (2) + ContentType (254) + ContentPart (254) + ContentField (254) + Published (1) + Latest (1) = 766 (less than 768) SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_ContentPickerFieldIndex_DocumentId_ContentType", "DocumentId", - "ContentType", - "ContentPart", - "ContentField", + "ContentType(254)", + "ContentPart(254)", + "ContentField(254)", "Published", "Latest") ); @@ -606,12 +639,14 @@ public int UpdateFrom3() "Latest") ); + // The index in MySQL can accommodate up to 768 characters or 3072 bytes. + // DocumentId (2) + ContentType (254) + ContentPart (254) + ContentField (254) + Published (1) + Latest (1) = 766 (less than 768) SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_TimeFieldIndex_DocumentId_ContentType", "DocumentId", - "ContentType", - "ContentPart", - "ContentField", + "ContentType(254)", + "ContentPart(254)", + "ContentField(254)", "Published", "Latest") ); @@ -633,12 +668,14 @@ public int UpdateFrom3() "Latest") ); + // The index in MySQL can accommodate up to 768 characters or 3072 bytes. + // DocumentId (2) + ContentType (254) + ContentPart (254) + ContentField (254) + Published (1) + Latest (1) = 766 (less than 768) SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_LinkFieldIndex_DocumentId_ContentType", "DocumentId", - "ContentType", - "ContentPart", - "ContentField", + "ContentType(254)", + "ContentPart(254)", + "ContentField(254)", "Published", "Latest") ); @@ -670,12 +707,14 @@ public int UpdateFrom3() "Latest") ); + // The index in MySQL can accommodate up to 768 characters or 3072 bytes. + // DocumentId (2) + ContentType (254) + ContentPart (254) + ContentField (254) + Published (1) + Latest (1) = 766 (less than 768) SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_HtmlFieldIndex_DocumentId_ContentType", "DocumentId", - "ContentType", - "ContentPart", - "ContentField", + "ContentType(254)", + "ContentPart(254)", + "ContentField(254)", "Published", "Latest") ); @@ -689,12 +728,14 @@ public int UpdateFrom3() "Latest") ); + // The index in MySQL can accommodate up to 768 characters or 3072 bytes. + // DocumentId (2) + ContentType (254) + ContentPart (254) + ContentField (254) + Published (1) + Latest (1) = 766 (less than 768) SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_MultiTextFieldIndex_DocumentId_ContentType", "DocumentId", - "ContentType", - "ContentPart", - "ContentField", + "ContentType(254)", + "ContentPart(254)", + "ContentField(254)", "Published", "Latest") ); diff --git a/src/OrchardCore.Modules/OrchardCore.ContentFields/Indexing/SQL/UserPickerMigrations.cs b/src/OrchardCore.Modules/OrchardCore.ContentFields/Indexing/SQL/UserPickerMigrations.cs index 2f0399ba2ae..8dd1e525174 100644 --- a/src/OrchardCore.Modules/OrchardCore.ContentFields/Indexing/SQL/UserPickerMigrations.cs +++ b/src/OrchardCore.Modules/OrchardCore.ContentFields/Indexing/SQL/UserPickerMigrations.cs @@ -30,12 +30,14 @@ public int Create() "Latest") ); + // The index in MySQL can accommodate up to 768 characters or 3072 bytes. + // DocumentId (2) + ContentType (254) + ContentPart (254) + ContentField (254) + Published (1) + Latest (1) = 766 (less than 768) SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_UserPickerFieldIndex_DocumentId_ContentType", "DocumentId", - "ContentType", - "ContentPart", - "ContentField", + "ContentType(254)", + "ContentPart(254)", + "ContentField(254)", "Published", "Latest") ); @@ -64,12 +66,14 @@ public int UpdateFrom1() "Latest") ); + // The index in MySQL can accommodate up to 768 characters or 3072 bytes. + // DocumentId (2) + ContentType (254) + ContentPart (254) + ContentField (254) + Published (1) + Latest (1) = 766 (less than 768) SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_UserPickerFieldIndex_DocumentId_ContentType", "DocumentId", - "ContentType", - "ContentPart", - "ContentField", + "ContentType(254)", + "ContentPart(254)", + "ContentField(254)", "Published", "Latest") ); diff --git a/src/OrchardCore.Modules/OrchardCore.PublishLater/Migrations.cs b/src/OrchardCore.Modules/OrchardCore.PublishLater/Migrations.cs index e80673581b7..5cf878faa68 100644 --- a/src/OrchardCore.Modules/OrchardCore.PublishLater/Migrations.cs +++ b/src/OrchardCore.Modules/OrchardCore.PublishLater/Migrations.cs @@ -1,7 +1,6 @@ using System; using OrchardCore.ContentManagement.Metadata; using OrchardCore.ContentManagement.Metadata.Settings; -using OrchardCore.ContentManagement.Records; using OrchardCore.Data.Migration; using OrchardCore.PublishLater.Indexes; using OrchardCore.PublishLater.Models; @@ -25,20 +24,20 @@ public int Create() .WithDescription("Adds the ability to schedule content items to be published at a given future date and time.")); SchemaBuilder.CreateMapIndexTable(table => table - .Column(nameof(PublishLaterPartIndex.ContentItemId)) - .Column(nameof(PublishLaterPartIndex.ScheduledPublishDateTimeUtc)) - .Column(nameof(PublishLaterPartIndex.Published)) - .Column(nameof(PublishLaterPartIndex.Latest)) + .Column("ContentItemId") + .Column("ScheduledPublishDateTimeUtc") + .Column("Published") + .Column("Latest") ); SchemaBuilder.AlterIndexTable(table => table - .CreateIndex($"IDX_{nameof(PublishLaterPartIndex)}_{nameof(ContentItemIndex.DocumentId)}", + .CreateIndex("IDX_PublishLaterPartIndex_DocumentId", "Id", - nameof(ContentItemIndex.DocumentId), - nameof(PublishLaterPartIndex.ContentItemId), - nameof(PublishLaterPartIndex.ScheduledPublishDateTimeUtc), - nameof(PublishLaterPartIndex.Published), - nameof(PublishLaterPartIndex.Latest)) + "DocumentId", + "ContentItemId", + "ScheduledPublishDateTimeUtc", + "Published", + "Latest") ); return 3; @@ -55,9 +54,9 @@ public int UpdateFrom1() ); SchemaBuilder.AlterIndexTable(table => table - .CreateIndex($"IDX_{nameof(PublishLaterPartIndex)}_{nameof(PublishLaterPartIndex.ScheduledPublishDateTimeUtc)}", - nameof(ContentItemIndex.DocumentId), - nameof(PublishLaterPartIndex.ScheduledPublishDateTimeUtc)) + .CreateIndex($"IDX_PublishLaterPartIndex_ScheduledPublishDateTimeUtc", + "DocumentId", + "ScheduledPublishDateTimeUtc") ); return 2; @@ -67,25 +66,25 @@ public int UpdateFrom2() { SchemaBuilder.AlterIndexTable(table => { - table.AddColumn(nameof(PublishLaterPartIndex.ContentItemId)); - table.AddColumn(nameof(PublishLaterPartIndex.Published)); - table.AddColumn(nameof(PublishLaterPartIndex.Latest)); + table.AddColumn("ContentItemId"); + table.AddColumn("Published"); + table.AddColumn("Latest"); }); SchemaBuilder.AlterIndexTable(table => { - table.DropIndex($"IDX_{nameof(PublishLaterPartIndex)}_{nameof(PublishLaterPartIndex.ScheduledPublishDateTimeUtc)}"); + table.DropIndex("IDX_PublishLaterPartIndex_ScheduledPublishDateTimeUtc"); }); SchemaBuilder.AlterIndexTable(table => { - table.CreateIndex($"IDX_{nameof(PublishLaterPartIndex)}_{nameof(PublishLaterPartIndex.ScheduledPublishDateTimeUtc)}", + table.CreateIndex("IDX_PublishLaterPartIndex_ScheduledPublishDateTimeUtc", "Id", - nameof(ContentItemIndex.DocumentId), - nameof(PublishLaterPartIndex.ContentItemId), - nameof(PublishLaterPartIndex.ScheduledPublishDateTimeUtc), - nameof(PublishLaterPartIndex.Published), - nameof(PublishLaterPartIndex.Latest)); + "DocumentId", + "ContentItemId", + "ScheduledPublishDateTimeUtc", + "Published", + "Latest"); }); return 3; diff --git a/src/OrchardCore.Modules/OrchardCore.Users/Migrations.cs b/src/OrchardCore.Modules/OrchardCore.Users/Migrations.cs index a25020b3fd8..8aeb35cb553 100644 --- a/src/OrchardCore.Modules/OrchardCore.Users/Migrations.cs +++ b/src/OrchardCore.Modules/OrchardCore.Users/Migrations.cs @@ -67,15 +67,15 @@ public int Create() ); SchemaBuilder.CreateMapIndexTable(table => table - .Column(nameof(UserByClaimIndex.ClaimType)) - .Column(nameof(UserByClaimIndex.ClaimValue)), + .Column("ClaimType") + .Column("ClaimValue"), null); SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_UserByClaimIndex_DocumentId", "DocumentId", - nameof(UserByClaimIndex.ClaimType), - nameof(UserByClaimIndex.ClaimValue)) + "ClaimType", + "ClaimValue") ); // Shortcut other migration steps on new content definition schemas. @@ -96,8 +96,8 @@ public int UpdateFrom1() public int UpdateFrom2() { SchemaBuilder.CreateMapIndexTable(table => table - .Column(nameof(UserByClaimIndex.ClaimType)) - .Column(nameof(UserByClaimIndex.ClaimValue)), + .Column("ClaimType") + .Column("ClaimValue"), null); return 3; @@ -107,7 +107,7 @@ public int UpdateFrom2() public int UpdateFrom3() { SchemaBuilder.AlterIndexTable(table => table - .AddColumn(nameof(UserIndex.IsEnabled), c => c.NotNull().WithDefault(true))); + .AddColumn("IsEnabled", c => c.NotNull().WithDefault(true))); return 4; } @@ -198,8 +198,8 @@ public int UpdateFrom8() SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_UserByClaimIndex_DocumentId", "DocumentId", - nameof(UserByClaimIndex.ClaimType), - nameof(UserByClaimIndex.ClaimValue)) + "ClaimType", + "ClaimValue") ); return 9; @@ -219,13 +219,13 @@ public int UpdateFrom9() public int UpdateFrom10() { SchemaBuilder.AlterIndexTable(table => table - .AddColumn(nameof(UserIndex.IsLockoutEnabled), c => c.NotNull().WithDefault(false))); + .AddColumn("IsLockoutEnabled", c => c.NotNull().WithDefault(false))); SchemaBuilder.AlterIndexTable(table => table - .AddColumn(nameof(UserIndex.LockoutEndUtc), c => c.Nullable())); + .AddColumn("LockoutEndUtc", c => c.Nullable())); SchemaBuilder.AlterIndexTable(table => table - .AddColumn(nameof(UserIndex.AccessFailedCount), c => c.NotNull().WithDefault(0))); + .AddColumn("AccessFailedCount", c => c.NotNull().WithDefault(0))); return 11; } diff --git a/src/OrchardCore.Modules/OrchardCore.Widgets/Assets/scss/widgetslist.edit.scss b/src/OrchardCore.Modules/OrchardCore.Widgets/Assets/scss/widgetslist.edit.scss index c81ccb9ab8c..3235103d070 100644 --- a/src/OrchardCore.Modules/OrchardCore.Widgets/Assets/scss/widgetslist.edit.scss +++ b/src/OrchardCore.Modules/OrchardCore.Widgets/Assets/scss/widgetslist.edit.scss @@ -61,3 +61,64 @@ } } } + +.btn-widget-metadata { + margin: 0 auto; + left: 0; + top: -6px; + position: absolute; + visibility: collapse; + height: 1px; + white-space: nowrap; + text-align: center; + transition: 0.3s visibility; + + > .btn-group { + top: -20px; + } +} + +.widget-editor-header { + &.card-header { + &:hover { + > .btn-widget-metadata { + visibility: visible; + } + } + } +} + +.btn-widget-add-below-wrapper{ + min-height: 5px; + + &:hover{ + > .btn-widget-add-below{ + border-width: 5px; + opacity: 1; + } + } +} + +.btn-widget-add-below { + height: 1px; + position: relative; + opacity: 0.5; + transition: 0.3s opacity; + + > .btn-group { + margin: 0 auto; + bottom: 17px; + } +} + +[dir="ltr"] .btn-widget-add-below { + > .btn-group { + left: calc(-14px + 50%); + } +} + +[dir="rtl"] .btn-widget-add-below { + > .btn-group { + right: calc(-14px + 50%); + } +} diff --git a/src/OrchardCore.Modules/OrchardCore.Widgets/wwwroot/Styles/widgetslist.edit.css b/src/OrchardCore.Modules/OrchardCore.Widgets/wwwroot/Styles/widgetslist.edit.css index af08501b4e2..ee2a9c13116 100644 --- a/src/OrchardCore.Modules/OrchardCore.Widgets/wwwroot/Styles/widgetslist.edit.css +++ b/src/OrchardCore.Modules/OrchardCore.Widgets/wwwroot/Styles/widgetslist.edit.css @@ -43,4 +43,50 @@ top: 5px; margin-left: -10px; } -/*# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndpZGdldHNsaXN0LmVkaXQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDSTtFQUNJOztBQUlBO0VBQ0k7O0FBSUE7RUFDSTs7QUFPSjtFQUNJOztBQUtaO0VBQ0k7RUFDQTs7QUFFQTtFQUNJOzs7QUFLWjtFQUNJOzs7QUFHSjtFQUNJOzs7QUFJQTtFQUNJO0VBQ0E7RUFDQTtFQUNBOztBQUVBO0VBQ0k7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBIiwiZmlsZSI6IndpZGdldHNsaXN0LmVkaXQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLndpZGdldC1lZGl0b3Ige1xyXG4gICAgLmNhcmQtYm9keSwgLmNhcmQtZm9vdGVyIHtcclxuICAgICAgICBkaXNwbGF5OiBpbmhlcml0O1xyXG4gICAgfVxyXG5cclxuICAgICYuY29sbGFwc2VkIHtcclxuICAgICAgICAuY2FyZC1ib2R5LCAuY2FyZC1mb290ZXIge1xyXG4gICAgICAgICAgICBkaXNwbGF5OiBub25lO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgPiAud2lkZ2V0LWVkaXRvci1oZWFkZXIge1xyXG4gICAgICAgICAgICAud2lkZ2V0LWVkaXRvci1idG4tY29sbGFwc2Uge1xyXG4gICAgICAgICAgICAgICAgZGlzcGxheTogbm9uZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICAmOm5vdCguY29sbGFwc2VkKSB7XHJcbiAgICAgICAgPiAud2lkZ2V0LWVkaXRvci1oZWFkZXIge1xyXG4gICAgICAgICAgICAud2lkZ2V0LWVkaXRvci1idG4tZXhwYW5kIHtcclxuICAgICAgICAgICAgICAgIGRpc3BsYXk6IG5vbmU7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgLndpZGdldC1lZGl0b3ItaGFuZGxlIHtcclxuICAgICAgICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XHJcbiAgICAgICAgbWFyZ2luLXJpZ2h0OiAwLjVyZW07XHJcblxyXG4gICAgICAgICY6aG92ZXIge1xyXG4gICAgICAgICAgICBjdXJzb3I6IG1vdmU7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG59XHJcblxyXG4ud2lkZ2V0LWVkaXRvci1idG4tY29sbGFwc2UsIC5jb2xsYXBzZWQgLndpZGdldC1lZGl0b3ItYnRuLWV4cGFuZCB7XHJcbiAgICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XHJcbn1cclxuXHJcbi53aWRnZXQtZHJvcHpvbmUtaGludCB7XHJcbiAgICBib3JkZXI6IDNweCBkYXNoZWQgb3JhbmdlO1xyXG59XHJcblxyXG4ud2lkZ2V0LWRyYWdkcm9wLXBsYWNlaG9sZGVyIHtcclxuICAgIGRpdiB7XHJcbiAgICAgICAgbWFyZ2luLXRvcDogNnB4O1xyXG4gICAgICAgIG1hcmdpbi1ib3R0b206IDZweDtcclxuICAgICAgICBtaW4taGVpZ2h0OiA2cHg7XHJcbiAgICAgICAgZGlzcGxheTogaW5saW5lLWJsb2NrO1xyXG5cclxuICAgICAgICAmOmJlZm9yZSB7XHJcbiAgICAgICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTtcclxuICAgICAgICAgICAgY29udGVudDogXCJcIjtcclxuICAgICAgICAgICAgd2lkdGg6IDA7XHJcbiAgICAgICAgICAgIGhlaWdodDogMDtcclxuICAgICAgICAgICAgYm9yZGVyOiA4cHggc29saWQgdHJhbnNwYXJlbnQ7XHJcbiAgICAgICAgICAgIGJvcmRlci1sZWZ0LWNvbG9yOiBvcmFuZ2U7XHJcbiAgICAgICAgICAgIGJvcmRlci1yaWdodDogbm9uZTtcclxuICAgICAgICAgICAgdG9wOiA1cHg7XHJcbiAgICAgICAgICAgIG1hcmdpbi1sZWZ0OiAtMTBweDtcclxuICAgICAgICB9XHJcbiAgICB9XHJcbn1cclxuIl19 */ + +.btn-widget-metadata { + margin: 0 auto; + left: 0; + top: -6px; + position: absolute; + visibility: collapse; + height: 1px; + white-space: nowrap; + text-align: center; + transition: 0.3s visibility; +} +.btn-widget-metadata > .btn-group { + top: -20px; +} + +.widget-editor-header.card-header:hover > .btn-widget-metadata { + visibility: visible; +} + +.btn-widget-add-below-wrapper { + min-height: 5px; +} +.btn-widget-add-below-wrapper:hover > .btn-widget-add-below { + border-width: 5px; + opacity: 1; +} + +.btn-widget-add-below { + height: 1px; + position: relative; + opacity: 0.5; + transition: 0.3s opacity; +} +.btn-widget-add-below > .btn-group { + margin: 0 auto; + bottom: 17px; +} + +[dir=ltr] .btn-widget-add-below > .btn-group { + left: calc(-14px + 50%); +} + +[dir=rtl] .btn-widget-add-below > .btn-group { + right: calc(-14px + 50%); +} +/*# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndpZGdldHNsaXN0LmVkaXQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDSTtFQUNJOztBQUlBO0VBQ0k7O0FBSUE7RUFDSTs7QUFPSjtFQUNJOztBQUtaO0VBQ0k7RUFDQTs7QUFFQTtFQUNJOzs7QUFLWjtFQUNJOzs7QUFHSjtFQUNJOzs7QUFJQTtFQUNJO0VBQ0E7RUFDQTtFQUNBOztBQUVBO0VBQ0k7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBOzs7QUFLWjtFQUNJO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTs7QUFFQTtFQUNJOzs7QUFPSTtFQUNJOzs7QUFNaEI7RUFDSTs7QUFHSTtFQUNJO0VBQ0E7OztBQUtaO0VBQ0k7RUFDQTtFQUNBO0VBQ0E7O0FBRUE7RUFDSTtFQUNBOzs7QUFLSjtFQUNJOzs7QUFLSjtFQUNJIiwiZmlsZSI6IndpZGdldHNsaXN0LmVkaXQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLndpZGdldC1lZGl0b3Ige1xyXG4gICAgLmNhcmQtYm9keSwgLmNhcmQtZm9vdGVyIHtcclxuICAgICAgICBkaXNwbGF5OiBpbmhlcml0O1xyXG4gICAgfVxyXG5cclxuICAgICYuY29sbGFwc2VkIHtcclxuICAgICAgICAuY2FyZC1ib2R5LCAuY2FyZC1mb290ZXIge1xyXG4gICAgICAgICAgICBkaXNwbGF5OiBub25lO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgPiAud2lkZ2V0LWVkaXRvci1oZWFkZXIge1xyXG4gICAgICAgICAgICAud2lkZ2V0LWVkaXRvci1idG4tY29sbGFwc2Uge1xyXG4gICAgICAgICAgICAgICAgZGlzcGxheTogbm9uZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICAmOm5vdCguY29sbGFwc2VkKSB7XHJcbiAgICAgICAgPiAud2lkZ2V0LWVkaXRvci1oZWFkZXIge1xyXG4gICAgICAgICAgICAud2lkZ2V0LWVkaXRvci1idG4tZXhwYW5kIHtcclxuICAgICAgICAgICAgICAgIGRpc3BsYXk6IG5vbmU7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgLndpZGdldC1lZGl0b3ItaGFuZGxlIHtcclxuICAgICAgICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XHJcbiAgICAgICAgbWFyZ2luLXJpZ2h0OiAwLjVyZW07XHJcblxyXG4gICAgICAgICY6aG92ZXIge1xyXG4gICAgICAgICAgICBjdXJzb3I6IG1vdmU7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG59XHJcblxyXG4ud2lkZ2V0LWVkaXRvci1idG4tY29sbGFwc2UsIC5jb2xsYXBzZWQgLndpZGdldC1lZGl0b3ItYnRuLWV4cGFuZCB7XHJcbiAgICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XHJcbn1cclxuXHJcbi53aWRnZXQtZHJvcHpvbmUtaGludCB7XHJcbiAgICBib3JkZXI6IDNweCBkYXNoZWQgb3JhbmdlO1xyXG59XHJcblxyXG4ud2lkZ2V0LWRyYWdkcm9wLXBsYWNlaG9sZGVyIHtcclxuICAgIGRpdiB7XHJcbiAgICAgICAgbWFyZ2luLXRvcDogNnB4O1xyXG4gICAgICAgIG1hcmdpbi1ib3R0b206IDZweDtcclxuICAgICAgICBtaW4taGVpZ2h0OiA2cHg7XHJcbiAgICAgICAgZGlzcGxheTogaW5saW5lLWJsb2NrO1xyXG5cclxuICAgICAgICAmOmJlZm9yZSB7XHJcbiAgICAgICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTtcclxuICAgICAgICAgICAgY29udGVudDogXCJcIjtcclxuICAgICAgICAgICAgd2lkdGg6IDA7XHJcbiAgICAgICAgICAgIGhlaWdodDogMDtcclxuICAgICAgICAgICAgYm9yZGVyOiA4cHggc29saWQgdHJhbnNwYXJlbnQ7XHJcbiAgICAgICAgICAgIGJvcmRlci1sZWZ0LWNvbG9yOiBvcmFuZ2U7XHJcbiAgICAgICAgICAgIGJvcmRlci1yaWdodDogbm9uZTtcclxuICAgICAgICAgICAgdG9wOiA1cHg7XHJcbiAgICAgICAgICAgIG1hcmdpbi1sZWZ0OiAtMTBweDtcclxuICAgICAgICB9XHJcbiAgICB9XHJcbn1cclxuXHJcbi5idG4td2lkZ2V0LW1ldGFkYXRhIHtcclxuICAgIG1hcmdpbjogMCBhdXRvO1xyXG4gICAgbGVmdDogMDtcclxuICAgIHRvcDogLTZweDtcclxuICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTtcclxuICAgIHZpc2liaWxpdHk6IGNvbGxhcHNlO1xyXG4gICAgaGVpZ2h0OiAxcHg7XHJcbiAgICB3aGl0ZS1zcGFjZTogbm93cmFwO1xyXG4gICAgdGV4dC1hbGlnbjogY2VudGVyO1xyXG4gICAgdHJhbnNpdGlvbjogMC4zcyB2aXNpYmlsaXR5O1xyXG5cclxuICAgID4gLmJ0bi1ncm91cCB7XHJcbiAgICAgICAgdG9wOiAtMjBweDtcclxuICAgIH1cclxufVxyXG5cclxuLndpZGdldC1lZGl0b3ItaGVhZGVyIHtcclxuICAgICYuY2FyZC1oZWFkZXIge1xyXG4gICAgICAgICY6aG92ZXIge1xyXG4gICAgICAgICAgICA+IC5idG4td2lkZ2V0LW1ldGFkYXRhIHtcclxuICAgICAgICAgICAgICAgIHZpc2liaWxpdHk6IHZpc2libGU7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcbn1cclxuXHJcbi5idG4td2lkZ2V0LWFkZC1iZWxvdy13cmFwcGVye1xyXG4gICAgbWluLWhlaWdodDogNXB4O1xyXG5cclxuICAgICY6aG92ZXJ7XHJcbiAgICAgICAgPiAuYnRuLXdpZGdldC1hZGQtYmVsb3d7XHJcbiAgICAgICAgICAgIGJvcmRlci13aWR0aDogNXB4O1xyXG4gICAgICAgICAgICBvcGFjaXR5OiAxO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxufVxyXG5cclxuLmJ0bi13aWRnZXQtYWRkLWJlbG93IHtcclxuICAgIGhlaWdodDogMXB4O1xyXG4gICAgcG9zaXRpb246IHJlbGF0aXZlO1xyXG4gICAgb3BhY2l0eTogMC41O1xyXG4gICAgdHJhbnNpdGlvbjogMC4zcyBvcGFjaXR5O1xyXG5cclxuICAgID4gLmJ0bi1ncm91cCB7XHJcbiAgICAgICAgbWFyZ2luOiAwIGF1dG87XHJcbiAgICAgICAgYm90dG9tOiAxN3B4O1xyXG4gICAgfVxyXG59XHJcblxyXG5bZGlyPVwibHRyXCJdIC5idG4td2lkZ2V0LWFkZC1iZWxvdyB7XHJcbiAgICA+IC5idG4tZ3JvdXAge1xyXG4gICAgICAgIGxlZnQ6IGNhbGMoLTE0cHggKyA1MCUpO1xyXG4gICAgfVxyXG59XHJcblxyXG5bZGlyPVwicnRsXCJdIC5idG4td2lkZ2V0LWFkZC1iZWxvdyB7XHJcbiAgICA+IC5idG4tZ3JvdXAge1xyXG4gICAgICAgIHJpZ2h0OiBjYWxjKC0xNHB4ICsgNTAlKTtcclxuICAgIH1cclxufVxyXG4iXX0= */ diff --git a/src/OrchardCore.Modules/OrchardCore.Widgets/wwwroot/Styles/widgetslist.edit.min.css b/src/OrchardCore.Modules/OrchardCore.Widgets/wwwroot/Styles/widgetslist.edit.min.css index b8317234951..7dd42d414ae 100644 --- a/src/OrchardCore.Modules/OrchardCore.Widgets/wwwroot/Styles/widgetslist.edit.min.css +++ b/src/OrchardCore.Modules/OrchardCore.Widgets/wwwroot/Styles/widgetslist.edit.min.css @@ -1 +1 @@ -.widget-editor .card-body,.widget-editor .card-footer{display:inherit}.widget-editor.collapsed .card-body,.widget-editor.collapsed .card-footer{display:none}.widget-editor.collapsed>.widget-editor-header .widget-editor-btn-collapse{display:none}.widget-editor:not(.collapsed)>.widget-editor-header .widget-editor-btn-expand{display:none}.widget-editor .widget-editor-handle{display:inline-block;margin-right:.5rem}.widget-editor .widget-editor-handle:hover{cursor:move}.collapsed .widget-editor-btn-expand,.widget-editor-btn-collapse{display:inline-block}.widget-dropzone-hint{border:3px dashed orange}.widget-dragdrop-placeholder div{margin-top:6px;margin-bottom:6px;min-height:6px;display:inline-block}.widget-dragdrop-placeholder div:before{position:absolute;content:"";width:0;height:0;border:8px solid transparent;border-left-color:orange;border-right:none;top:5px;margin-left:-10px} +.widget-editor .card-body,.widget-editor .card-footer{display:inherit}.widget-editor.collapsed .card-body,.widget-editor.collapsed .card-footer{display:none}.widget-editor.collapsed>.widget-editor-header .widget-editor-btn-collapse{display:none}.widget-editor:not(.collapsed)>.widget-editor-header .widget-editor-btn-expand{display:none}.widget-editor .widget-editor-handle{display:inline-block;margin-right:.5rem}.widget-editor .widget-editor-handle:hover{cursor:move}.collapsed .widget-editor-btn-expand,.widget-editor-btn-collapse{display:inline-block}.widget-dropzone-hint{border:3px dashed orange}.widget-dragdrop-placeholder div{margin-top:6px;margin-bottom:6px;min-height:6px;display:inline-block}.widget-dragdrop-placeholder div:before{position:absolute;content:"";width:0;height:0;border:8px solid transparent;border-left-color:orange;border-right:none;top:5px;margin-left:-10px}.btn-widget-metadata{margin:0 auto;left:0;top:-6px;position:absolute;visibility:collapse;height:1px;white-space:nowrap;text-align:center;transition:.3s visibility}.btn-widget-metadata>.btn-group{top:-20px}.widget-editor-header.card-header:hover>.btn-widget-metadata{visibility:visible}.btn-widget-add-below-wrapper{min-height:5px}.btn-widget-add-below-wrapper:hover>.btn-widget-add-below{border-width:5px;opacity:1}.btn-widget-add-below{height:1px;position:relative;opacity:.5;transition:.3s opacity}.btn-widget-add-below>.btn-group{margin:0 auto;bottom:17px}[dir=ltr] .btn-widget-add-below>.btn-group{left:calc(-14px + 50%)}[dir=rtl] .btn-widget-add-below>.btn-group{right:calc(-14px + 50%)} diff --git a/src/OrchardCore/OrchardCore.OpenId.Core/YesSql/Migrations/OpenIdMigrations.cs b/src/OrchardCore/OrchardCore.OpenId.Core/YesSql/Migrations/OpenIdMigrations.cs index 08956520fee..9432e32024d 100644 --- a/src/OrchardCore/OrchardCore.OpenId.Core/YesSql/Migrations/OpenIdMigrations.cs +++ b/src/OrchardCore/OrchardCore.OpenId.Core/YesSql/Migrations/OpenIdMigrations.cs @@ -32,133 +32,130 @@ public int Create() SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_COL_OpenIdApplication", "DocumentId", - nameof(OpenIdApplicationIndex.ApplicationId), - nameof(OpenIdApplicationIndex.ClientId)), + "ApplicationId", + "ClientId"), collection: OpenIdApplicationCollection ); SchemaBuilder.CreateReduceIndexTable(table => table - .Column(nameof(OpenIdAppByLogoutUriIndex.LogoutRedirectUri)) - .Column(nameof(OpenIdAppByLogoutUriIndex.Count)), + .Column("LogoutRedirectUri") + .Column("Count"), collection: OpenIdApplicationCollection); SchemaBuilder.AlterIndexTable(table => table - .CreateIndex("IDX_COL_OpenIdAppByLogoutUri_LogoutRedirectUri", - nameof(OpenIdAppByLogoutUriIndex.LogoutRedirectUri)), + .CreateIndex("IDX_COL_OpenIdAppByLogoutUri_LogoutRedirectUri", "LogoutRedirectUri"), collection: OpenIdApplicationCollection ); SchemaBuilder.CreateReduceIndexTable(table => table - .Column(nameof(OpenIdAppByRedirectUriIndex.RedirectUri)) - .Column(nameof(OpenIdAppByRedirectUriIndex.Count)), + .Column("RedirectUri") + .Column("Count"), collection: OpenIdApplicationCollection); SchemaBuilder.AlterIndexTable(table => table - .CreateIndex("IDX_COL_OpenIdAppByRedirectUri_RedirectUri", - nameof(OpenIdAppByRedirectUriIndex.RedirectUri)), + .CreateIndex("IDX_COL_OpenIdAppByRedirectUri_RedirectUri", "RedirectUri"), collection: OpenIdApplicationCollection ); SchemaBuilder.CreateReduceIndexTable(table => table - .Column(nameof(OpenIdAppByRoleNameIndex.RoleName)) - .Column(nameof(OpenIdAppByRoleNameIndex.Count)), + .Column("RoleName") + .Column("Count"), collection: OpenIdApplicationCollection); SchemaBuilder.AlterIndexTable(table => table - .CreateIndex("IDX_COL_OpenIdAppByRoleName_RoleName", - nameof(OpenIdAppByRoleNameIndex.RoleName)), + .CreateIndex("IDX_COL_OpenIdAppByRoleName_RoleName", "RoleName"), collection: OpenIdApplicationCollection ); SchemaBuilder.CreateMapIndexTable(table => table - .Column(nameof(OpenIdAuthorizationIndex.AuthorizationId), column => column.WithLength(48)) - .Column(nameof(OpenIdAuthorizationIndex.ApplicationId), column => column.WithLength(48)) - .Column(nameof(OpenIdAuthorizationIndex.Status)) - .Column(nameof(OpenIdAuthorizationIndex.Subject)) - .Column(nameof(OpenIdAuthorizationIndex.Type)) - .Column(nameof(OpenIdAuthorizationIndex.CreationDate)), + .Column("AuthorizationId", column => column.WithLength(48)) + .Column("ApplicationId", column => column.WithLength(48)) + .Column("Status") + .Column("Subject") + .Column("Type") + .Column("CreationDate"), collection: OpenIdAuthorizationCollection); SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_COL_OpenIdAuthorization_ApplicationId", "DocumentId", - nameof(OpenIdAuthorizationIndex.ApplicationId), - nameof(OpenIdAuthorizationIndex.Status), - nameof(OpenIdAuthorizationIndex.Subject)), + "ApplicationId", + "Status", + "Subject"), collection: OpenIdAuthorizationCollection ); SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_COL_OpenIdAuthorization_AuthorizationId", "DocumentId", - nameof(OpenIdAuthorizationIndex.AuthorizationId), - nameof(OpenIdAuthorizationIndex.Status), - nameof(OpenIdAuthorizationIndex.Type), - nameof(OpenIdAuthorizationIndex.CreationDate)), + "AuthorizationId", + "Status", + "Type", + "CreationDate"), collection: OpenIdAuthorizationCollection ); SchemaBuilder.CreateMapIndexTable(table => table - .Column(nameof(OpenIdScopeIndex.Name), column => column.Unique()) - .Column(nameof(OpenIdScopeIndex.ScopeId), column => column.WithLength(48)), + .Column("Name", column => column.Unique()) + .Column("ScopeId", column => column.WithLength(48)), collection: OpenIdScopeCollection); SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_COL_OpenIdScope", "DocumentId", - nameof(OpenIdScopeIndex.Name), - nameof(OpenIdScopeIndex.ScopeId)), + "Name", + "ScopeId"), collection: OpenIdScopeCollection ); SchemaBuilder.CreateReduceIndexTable(table => table - .Column(nameof(OpenIdScopeByResourceIndex.Resource)) - .Column(nameof(OpenIdScopeByResourceIndex.Count)), + .Column("Resource") + .Column("Count"), collection: OpenIdScopeCollection); SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_COL_OpenIdScopeByResource_Resource", - nameof(OpenIdScopeByResourceIndex.Resource)), + "Resource"), collection: OpenIdScopeCollection ); SchemaBuilder.CreateMapIndexTable(table => table - .Column(nameof(OpenIdTokenIndex.TokenId), column => column.WithLength(48)) - .Column(nameof(OpenIdTokenIndex.ApplicationId), column => column.WithLength(48)) - .Column(nameof(OpenIdTokenIndex.AuthorizationId), column => column.WithLength(48)) - .Column(nameof(OpenIdTokenIndex.ExpirationDate)) - .Column(nameof(OpenIdTokenIndex.ReferenceId)) - .Column(nameof(OpenIdTokenIndex.Status)) - .Column(nameof(OpenIdTokenIndex.Subject)) - .Column(nameof(OpenIdTokenIndex.Type)) - .Column(nameof(OpenIdTokenIndex.CreationDate)), + .Column("TokenId", column => column.WithLength(48)) + .Column("ApplicationId", column => column.WithLength(48)) + .Column("AuthorizationId", column => column.WithLength(48)) + .Column("ExpirationDate") + .Column("ReferenceId") + .Column("Status") + .Column("Subject") + .Column("Type") + .Column("CreationDate"), collection: OpenIdTokenCollection); SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_COL_OpenIdToken_ApplicationId", "DocumentId", - nameof(OpenIdTokenIndex.ApplicationId), - nameof(OpenIdTokenIndex.Status), - nameof(OpenIdTokenIndex.Subject)), + "ApplicationId", + "Status", + "Subject"), collection: OpenIdTokenCollection ); SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_COL_OpenIdToken_AuthorizationId", "DocumentId", - nameof(OpenIdTokenIndex.AuthorizationId), - nameof(OpenIdTokenIndex.Status), - nameof(OpenIdTokenIndex.Type), - nameof(OpenIdTokenIndex.CreationDate), - nameof(OpenIdTokenIndex.ExpirationDate)), + "AuthorizationId", + "Status", + "Type", + "CreationDate", + "ExpirationDate"), collection: OpenIdTokenCollection ); SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_COL_OpenIdToken_TokenId", "DocumentId", - nameof(OpenIdTokenIndex.TokenId), - nameof(OpenIdTokenIndex.ReferenceId)), + "TokenId", + "ReferenceId"), collection: OpenIdTokenCollection ); @@ -170,7 +167,7 @@ public int Create() public int UpdateFrom1() { SchemaBuilder.AlterIndexTable(table => table - .AddColumn(nameof(OpenIdTokenIndex.Type))); + .AddColumn("Type")); return 2; } @@ -187,16 +184,16 @@ public int UpdateFrom2() SchemaBuilder.DropReduceIndexTable(null); SchemaBuilder.CreateReduceIndexTable(table => table - .Column(nameof(OpenIdAppByLogoutUriIndex.LogoutRedirectUri)) - .Column(nameof(OpenIdAppByLogoutUriIndex.Count))); + .Column("LogoutRedirectUri") + .Column("Count")); SchemaBuilder.CreateReduceIndexTable(table => table - .Column(nameof(OpenIdAppByRedirectUriIndex.RedirectUri)) - .Column(nameof(OpenIdAppByRedirectUriIndex.Count))); + .Column("RedirectUri") + .Column("Count")); SchemaBuilder.CreateReduceIndexTable(table => table - .Column(nameof(OpenIdAppByRoleNameIndex.RoleName)) - .Column(nameof(OpenIdAppByRoleNameIndex.Count))); + .Column("RoleName") + .Column("Count")); return 3; } @@ -205,10 +202,10 @@ public int UpdateFrom2() public int UpdateFrom3() { SchemaBuilder.AlterIndexTable(table => table - .AddColumn(nameof(OpenIdAuthorizationIndex.CreationDate))); + .AddColumn("CreationDate")); SchemaBuilder.AlterIndexTable(table => table - .AddColumn(nameof(OpenIdTokenIndex.CreationDate))); + .AddColumn("CreationDate")); return 4; } @@ -219,57 +216,57 @@ public int UpdateFrom4() SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_OpenIdApplicationIndex_DocumentId", "DocumentId", - nameof(OpenIdApplicationIndex.ApplicationId), - nameof(OpenIdApplicationIndex.ClientId)) + "ApplicationId", + "ClientId") ); SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_OpenIdAuthorizationIndex_DocumentId_ApplicationId", "DocumentId", - nameof(OpenIdAuthorizationIndex.ApplicationId), - nameof(OpenIdAuthorizationIndex.Status), - nameof(OpenIdAuthorizationIndex.Subject)) + "ApplicationId", + "Status", + "Subject") ); SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_OpenIdAuthorizationIndex_DocumentId_AuthorizationId", "DocumentId", - nameof(OpenIdAuthorizationIndex.AuthorizationId), - nameof(OpenIdAuthorizationIndex.Status), - nameof(OpenIdAuthorizationIndex.Type), - nameof(OpenIdAuthorizationIndex.CreationDate)) + "AuthorizationId", + "Status", + "Type", + "CreationDate") ); SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_OpenIdScopeIndex_DocumentId", "DocumentId", - nameof(OpenIdScopeIndex.Name), - nameof(OpenIdScopeIndex.ScopeId)) + "Name", + "ScopeId") ); SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_OpenIdTokenIndex_DocumentId_ApplicationId", "DocumentId", - nameof(OpenIdTokenIndex.ApplicationId), - nameof(OpenIdTokenIndex.Status), - nameof(OpenIdTokenIndex.Subject)) + "ApplicationId", + "Status", + "Subject") ); SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_OpenIdTokenIndex_DocumentId_AuthorizationId", "DocumentId", - nameof(OpenIdTokenIndex.AuthorizationId), - nameof(OpenIdTokenIndex.Status), - nameof(OpenIdTokenIndex.Type), - nameof(OpenIdTokenIndex.CreationDate), - nameof(OpenIdTokenIndex.ExpirationDate)) + "AuthorizationId", + "Status", + "Type", + "CreationDate", + "ExpirationDate") ); SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_OpenIdTokenIndex_DocumentId_TokenId", "DocumentId", - nameof(OpenIdTokenIndex.TokenId), - nameof(OpenIdTokenIndex.ReferenceId)) + "TokenId", + "ReferenceId") ); return 5; @@ -279,23 +276,19 @@ public int UpdateFrom4() public int UpdateFrom5() { SchemaBuilder.AlterIndexTable(table => table - .CreateIndex("IDX_OpenIdAppByLogoutUriIndex_LogoutRedirectUri", - nameof(OpenIdAppByLogoutUriIndex.LogoutRedirectUri)) + .CreateIndex("IDX_OpenIdAppByLogoutUriIndex_LogoutRedirectUri", "LogoutRedirectUri") ); SchemaBuilder.AlterIndexTable(table => table - .CreateIndex("IDX_OpenIdAppByRedirectUriIndex_RedirectUri", - nameof(OpenIdAppByRedirectUriIndex.RedirectUri)) + .CreateIndex("IDX_OpenIdAppByRedirectUriIndex_RedirectUri", "RedirectUri") ); SchemaBuilder.AlterIndexTable(table => table - .CreateIndex("IDX_OpenIdAppByRoleNameIndex_RoleName", - nameof(OpenIdAppByRoleNameIndex.RoleName)) + .CreateIndex("IDX_OpenIdAppByRoleNameIndex_RoleName", "RoleName") ); SchemaBuilder.AlterIndexTable(table => table - .CreateIndex("IDX_OpenIdScopeByResourceIndex_Resource", - nameof(OpenIdScopeByResourceIndex.Resource)) + .CreateIndex("IDX_OpenIdScopeByResourceIndex_Resource", "Resource") ); return 6; @@ -306,70 +299,70 @@ public async Task UpdateFrom6Async() { // Create all index tables with the new collection value. SchemaBuilder.CreateMapIndexTable(table => table - .Column(nameof(OpenIdTokenIndex.TokenId), column => column.WithLength(48)) - .Column(nameof(OpenIdTokenIndex.ApplicationId), column => column.WithLength(48)) - .Column(nameof(OpenIdTokenIndex.AuthorizationId), column => column.WithLength(48)) - .Column(nameof(OpenIdTokenIndex.ExpirationDate)) - .Column(nameof(OpenIdTokenIndex.ReferenceId)) - .Column(nameof(OpenIdTokenIndex.Status)) - .Column(nameof(OpenIdTokenIndex.Subject)) - .Column(nameof(OpenIdTokenIndex.Type)) - .Column(nameof(OpenIdTokenIndex.CreationDate)), + .Column("TokenId", column => column.WithLength(48)) + .Column("ApplicationId", column => column.WithLength(48)) + .Column("AuthorizationId", column => column.WithLength(48)) + .Column("ExpirationDate") + .Column("ReferenceId") + .Column("Status") + .Column("Subject") + .Column("Type") + .Column("CreationDate"), collection: OpenIdTokenCollection); SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_COL_OpenIdToken_ApplicationId", "DocumentId", - nameof(OpenIdTokenIndex.ApplicationId), - nameof(OpenIdTokenIndex.Status), - nameof(OpenIdTokenIndex.Subject)), + "ApplicationId", + "Status", + "Subject"), collection: OpenIdTokenCollection ); SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_COL_OpenIdToken_AuthorizationId", "DocumentId", - nameof(OpenIdTokenIndex.AuthorizationId), - nameof(OpenIdTokenIndex.Status), - nameof(OpenIdTokenIndex.Type), - nameof(OpenIdTokenIndex.CreationDate), - nameof(OpenIdTokenIndex.ExpirationDate)), + "AuthorizationId", + "Status", + "Type", + "CreationDate", + "ExpirationDate"), collection: OpenIdTokenCollection ); SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_COL_OpenIdToken_TokenId", "DocumentId", - nameof(OpenIdTokenIndex.TokenId), - nameof(OpenIdTokenIndex.ReferenceId)), + "TokenId", + "ReferenceId"), collection: OpenIdTokenCollection ); SchemaBuilder.CreateMapIndexTable(table => table - .Column(nameof(OpenIdAuthorizationIndex.AuthorizationId), column => column.WithLength(48)) - .Column(nameof(OpenIdAuthorizationIndex.ApplicationId), column => column.WithLength(48)) - .Column(nameof(OpenIdAuthorizationIndex.Status)) - .Column(nameof(OpenIdAuthorizationIndex.Subject)) - .Column(nameof(OpenIdAuthorizationIndex.Type)) - .Column(nameof(OpenIdAuthorizationIndex.CreationDate)), + .Column("AuthorizationId", column => column.WithLength(48)) + .Column("ApplicationId", column => column.WithLength(48)) + .Column("Status") + .Column("Subject") + .Column("Type") + .Column("CreationDate"), collection: OpenIdAuthorizationCollection); SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_COL_OpenIdAuthorization_ApplicationId", "DocumentId", - nameof(OpenIdAuthorizationIndex.ApplicationId), - nameof(OpenIdAuthorizationIndex.Status), - nameof(OpenIdAuthorizationIndex.Subject)), + "ApplicationId", + "Status", + "Subject"), collection: OpenIdAuthorizationCollection ); SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_COL_OpenIdAuthorization_AuthorizationId", "DocumentId", - nameof(OpenIdAuthorizationIndex.AuthorizationId), - nameof(OpenIdAuthorizationIndex.Status), - nameof(OpenIdAuthorizationIndex.Type), - nameof(OpenIdAuthorizationIndex.CreationDate)), + "AuthorizationId", + "Status", + "Type", + "CreationDate"), collection: OpenIdAuthorizationCollection ); @@ -411,72 +404,68 @@ public async Task UpdateFrom7Async() { // Create all index tables with the new collection value. SchemaBuilder.CreateMapIndexTable(table => table - .Column(nameof(OpenIdApplicationIndex.ApplicationId), column => column.WithLength(48)) - .Column(nameof(OpenIdApplicationIndex.ClientId), column => column.Unique()), + .Column("ApplicationId", column => column.WithLength(48)) + .Column("ClientId", column => column.Unique()), collection: OpenIdApplicationCollection); SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_COL_OpenIdApplication", "DocumentId", - nameof(OpenIdApplicationIndex.ApplicationId), - nameof(OpenIdApplicationIndex.ClientId)), + "ApplicationId", + "ClientId"), collection: OpenIdApplicationCollection ); SchemaBuilder.CreateReduceIndexTable(table => table - .Column(nameof(OpenIdAppByLogoutUriIndex.LogoutRedirectUri)) - .Column(nameof(OpenIdAppByLogoutUriIndex.Count)), + .Column("LogoutRedirectUri") + .Column("Count"), collection: OpenIdApplicationCollection); SchemaBuilder.AlterIndexTable(table => table - .CreateIndex("IDX_COL_OpenIdAppByLogoutUri_LogoutRedirectUri", - nameof(OpenIdAppByLogoutUriIndex.LogoutRedirectUri)), + .CreateIndex("IDX_COL_OpenIdAppByLogoutUri_LogoutRedirectUri", "LogoutRedirectUri"), collection: OpenIdApplicationCollection ); SchemaBuilder.CreateReduceIndexTable(table => table - .Column(nameof(OpenIdAppByRedirectUriIndex.RedirectUri)) - .Column(nameof(OpenIdAppByRedirectUriIndex.Count)), + .Column("RedirectUri") + .Column("Count"), collection: OpenIdApplicationCollection); SchemaBuilder.AlterIndexTable(table => table - .CreateIndex("IDX_COL_OpenIdAppByRedirectUri_RedirectUri", - nameof(OpenIdAppByRedirectUriIndex.RedirectUri)), + .CreateIndex("IDX_COL_OpenIdAppByRedirectUri_RedirectUri", "RedirectUri"), collection: OpenIdApplicationCollection ); SchemaBuilder.CreateReduceIndexTable(table => table - .Column(nameof(OpenIdAppByRoleNameIndex.RoleName)) - .Column(nameof(OpenIdAppByRoleNameIndex.Count)), + .Column("RoleName") + .Column("Count"), collection: OpenIdApplicationCollection); SchemaBuilder.AlterIndexTable(table => table - .CreateIndex("IDX_COL_OpenIdAppByRoleName_RoleName", - nameof(OpenIdAppByRoleNameIndex.RoleName)), + .CreateIndex("IDX_COL_OpenIdAppByRoleName_RoleName", "RoleName"), collection: OpenIdApplicationCollection ); SchemaBuilder.CreateMapIndexTable(table => table - .Column(nameof(OpenIdScopeIndex.Name), column => column.Unique()) - .Column(nameof(OpenIdScopeIndex.ScopeId), column => column.WithLength(48)), + .Column("Name", column => column.Unique()) + .Column("ScopeId", column => column.WithLength(48)), collection: OpenIdScopeCollection); SchemaBuilder.AlterIndexTable(table => table .CreateIndex("IDX_COL_OpenIdScope", "DocumentId", - nameof(OpenIdScopeIndex.Name), - nameof(OpenIdScopeIndex.ScopeId)), + "Name", + "ScopeId"), collection: OpenIdScopeCollection ); SchemaBuilder.CreateReduceIndexTable(table => table - .Column(nameof(OpenIdScopeByResourceIndex.Resource)) - .Column(nameof(OpenIdScopeByResourceIndex.Count)), + .Column("Resource") + .Column("Count"), collection: OpenIdScopeCollection); SchemaBuilder.AlterIndexTable(table => table - .CreateIndex("IDX_COL_OpenIdScopeByResource_Resource", - nameof(OpenIdScopeByResourceIndex.Resource)), + .CreateIndex("IDX_COL_OpenIdScopeByResource_Resource", "Resource"), collection: OpenIdScopeCollection ); diff --git a/src/docs/resources/libraries/README.md b/src/docs/resources/libraries/README.md index 68c2b3b21eb..aa06b466c77 100644 --- a/src/docs/resources/libraries/README.md +++ b/src/docs/resources/libraries/README.md @@ -41,7 +41,7 @@ The below table lists the different .NET libraries used in Orchard Core: | [Serilog.AspNetCore](https://github.com/serilog/serilog-aspnetcore) | Serilog integration for ASP.NET Core. | 7.0.0 | [Apache-2.0](https://github.com/serilog/serilog-aspnetcore/blob/dev/LICENSE) | | [Shortcodes](https://github.com/sebastienros/shortcodes) | Shortcodes processor for .NET. | 1.3.3 | [MIT](https://github.com/sebastienros/shortcodes/blob/dev/LICENSE) | | [StackExchange.Redis](https://github.com/StackExchange/StackExchange.Redis) | General purpose redis client. | 2.6.122 | [MIT](https://github.com/StackExchange/StackExchange.Redis/blob/main/LICENSE) | -| [YesSql](https://github.com/sebastienros/yessql) | .NET document database working on any RDBMS. | 3.3.0 | [MIT](https://github.com/sebastienros/yessql/blob/dev/LICENSE) | +| [YesSql](https://github.com/sebastienros/yessql) | .NET document database working on any RDBMS. | 3.4.0 | [MIT](https://github.com/sebastienros/yessql/blob/dev/LICENSE) | | [ZString](https://github.com/Cysharp/ZString) | Zero Allocation StringBuilder for .NET Core and Unity. | 2.5.0 | [MIT](https://github.com/Cysharp/ZString/blob/master/LICENSE) | The below table lists the different libraries used as Resources: diff --git a/test/OrchardCore.Tests/Orchard.Queries/SqlParserTests.cs b/test/OrchardCore.Tests/Orchard.Queries/SqlParserTests.cs index d0197c9502e..684410d3cea 100644 --- a/test/OrchardCore.Tests/Orchard.Queries/SqlParserTests.cs +++ b/test/OrchardCore.Tests/Orchard.Queries/SqlParserTests.cs @@ -66,9 +66,9 @@ public void ShouldParseWhereClause(string sql, string expectedSql) [InlineData("select a where a = false", "SELECT [a] WHERE [a] = 0;")] [InlineData("select a where a = 1", "SELECT [a] WHERE [a] = 1;")] [InlineData("select a where a = 1.234", "SELECT [a] WHERE [a] = 1.234;")] - [InlineData("select a where a = 'foo'", "SELECT [a] WHERE [a] = 'foo';")] - [InlineData("select a where a like '%foo%'", "SELECT [a] WHERE [a] LIKE '%foo%';")] - [InlineData("select a where a not like '%foo%'", "SELECT [a] WHERE [a] NOT LIKE '%foo%';")] + [InlineData("select a where a = 'foo'", "SELECT [a] WHERE [a] = N'foo';")] + [InlineData("select a where a like '%foo%'", "SELECT [a] WHERE [a] LIKE N'%foo%';")] + [InlineData("select a where a not like '%foo%'", "SELECT [a] WHERE [a] NOT LIKE N'%foo%';")] [InlineData("select a where a between b and c", "SELECT [a] WHERE [a] BETWEEN [b] AND [c];")] [InlineData("select a where a not between b and c", "SELECT [a] WHERE [a] NOT BETWEEN [b] AND [c];")] [InlineData("select a where a = b or c = d", "SELECT [a] WHERE [a] = [b] OR [c] = [d];")] @@ -113,8 +113,8 @@ public void ShouldDefineDefaultParametersValue() [InlineData("select a from b inner join c on b.b1 = c.c1 left join d on d.a = d.b", "SELECT [a] FROM [tp_b] INNER JOIN [tp_c] ON [tp_b].[b1] = [tp_c].[c1] LEFT JOIN [tp_d] ON [tp_d].[a] = [tp_d].[b];")] [InlineData("select a from b inner join c on b.b1 = c.c1 and b.b2 = c.c2", "SELECT [a] FROM [tp_b] INNER JOIN [tp_c] ON [tp_b].[b1] = [tp_c].[c1] AND [tp_b].[b2] = [tp_c].[c2];")] [InlineData("select a from b inner join c on b.b1 = c.c1 and b.b2 = @param", "SELECT [a] FROM [tp_b] INNER JOIN [tp_c] ON [tp_b].[b1] = [tp_c].[c1] AND [tp_b].[b2] = @param;")] - [InlineData("select a from b inner join c on 1 = 1 and @param = 'foo'", "SELECT [a] FROM [tp_b] INNER JOIN [tp_c] ON 1 = 1 AND @param = 'foo';")] - [InlineData("select a from b inner join c on 1 = @param left join d on d.a = @param left join e on e.a = 'foo'", "SELECT [a] FROM [tp_b] INNER JOIN [tp_c] ON 1 = @param LEFT JOIN [tp_d] ON [tp_d].[a] = @param LEFT JOIN [tp_e] ON [tp_e].[a] = 'foo';")] + [InlineData("select a from b inner join c on 1 = 1 and @param = 'foo'", "SELECT [a] FROM [tp_b] INNER JOIN [tp_c] ON 1 = 1 AND @param = N'foo';")] + [InlineData("select a from b inner join c on 1 = @param left join d on d.a = @param left join e on e.a = 'foo'", "SELECT [a] FROM [tp_b] INNER JOIN [tp_c] ON 1 = @param LEFT JOIN [tp_d] ON [tp_d].[a] = @param LEFT JOIN [tp_e] ON [tp_e].[a] = N'foo';")] public void ShouldParseJoinClause(string sql, string expectedSql) { var result = SqlParser.TryParse(sql, _schema, _defaultDialect, _defaultTablePrefix, null, out var rawQuery, out _);