diff --git a/Raven.Migrations.Sample/Common/RavenExtensions.cs b/Raven.Migrations.Sample/Common/RavenExtensions.cs index 182919a..2770dfb 100644 --- a/Raven.Migrations.Sample/Common/RavenExtensions.cs +++ b/Raven.Migrations.Sample/Common/RavenExtensions.cs @@ -16,10 +16,10 @@ public static IDocumentStore EnsureExists(this IDocumentStore store) using var dbSession = store.OpenSession(); dbSession.Query().Take(0).ToList(); } - catch (Raven.Client.Exceptions.Database.DatabaseDoesNotExistException) + catch (Client.Exceptions.Database.DatabaseDoesNotExistException) { // Create the database. - store.Maintenance.Server.Send(new Raven.Client.ServerWide.Operations.CreateDatabaseOperation(new Raven.Client.ServerWide.DatabaseRecord + store.Maintenance.Server.Send(new Client.ServerWide.Operations.CreateDatabaseOperation(new Client.ServerWide.DatabaseRecord { DatabaseName = store.Database })); diff --git a/Raven.Migrations.Sample/Migrations/004-MigrationsCanRelyOnDIServices.cs b/Raven.Migrations.Sample/Migrations/004-MigrationsCanRelyOnDIServices.cs index 1e06eb1..25e4327 100644 --- a/Raven.Migrations.Sample/Migrations/004-MigrationsCanRelyOnDIServices.cs +++ b/Raven.Migrations.Sample/Migrations/004-MigrationsCanRelyOnDIServices.cs @@ -1,8 +1,4 @@ using Raven.Migrations.Sample.Services; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; namespace Raven.Migrations.Sample.Migrations { diff --git a/Raven.Migrations.Sample/Program.cs b/Raven.Migrations.Sample/Program.cs index a49b083..37805ea 100644 --- a/Raven.Migrations.Sample/Program.cs +++ b/Raven.Migrations.Sample/Program.cs @@ -1,11 +1,5 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.Logging; namespace Raven.Migrations.Sample { diff --git a/Raven.Migrations.Sample/Raven.Migrations.Sample.csproj b/Raven.Migrations.Sample/Raven.Migrations.Sample.csproj index aa82544..317065b 100644 --- a/Raven.Migrations.Sample/Raven.Migrations.Sample.csproj +++ b/Raven.Migrations.Sample/Raven.Migrations.Sample.csproj @@ -3,7 +3,7 @@ net8.0 - + diff --git a/Raven.Migrations.Sample/Services/SillyService.cs b/Raven.Migrations.Sample/Services/SillyService.cs index 7d6cb94..3a4a151 100644 --- a/Raven.Migrations.Sample/Services/SillyService.cs +++ b/Raven.Migrations.Sample/Services/SillyService.cs @@ -1,8 +1,4 @@ -using Microsoft.Extensions.Logging; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; +using System; namespace Raven.Migrations.Sample.Services { diff --git a/Raven.Migrations.Sample/Startup.cs b/Raven.Migrations.Sample/Startup.cs index 156315b..fc370da 100644 --- a/Raven.Migrations.Sample/Startup.cs +++ b/Raven.Migrations.Sample/Startup.cs @@ -1,10 +1,5 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.HttpsPolicy; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; diff --git a/Raven.Migrations.Tests/Raven.Migrations.Tests.csproj b/Raven.Migrations.Tests/Raven.Migrations.Tests.csproj index 7ca03a4..b716e28 100644 --- a/Raven.Migrations.Tests/Raven.Migrations.Tests.csproj +++ b/Raven.Migrations.Tests/Raven.Migrations.Tests.csproj @@ -4,14 +4,17 @@ false - - - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/Raven.Migrations.Tests/RunnerTests.cs b/Raven.Migrations.Tests/RunnerTests.cs index 637d0c4..ada9378 100644 --- a/Raven.Migrations.Tests/RunnerTests.cs +++ b/Raven.Migrations.Tests/RunnerTests.cs @@ -1,10 +1,9 @@ -using System.Linq; -using System.Reflection; -using FluentAssertions; +using FluentAssertions; using Raven.Client.Documents.Indexes; using Raven.TestDriver; +using System.Linq; +using System.Reflection; using Xunit; -using static System.Formats.Asn1.AsnWriter; namespace Raven.Migrations.Tests { diff --git a/Raven.Migrations/DependencyInjectionMigrationResolver.cs b/Raven.Migrations/DependencyInjectionMigrationResolver.cs index 92923d6..1f719bb 100644 --- a/Raven.Migrations/DependencyInjectionMigrationResolver.cs +++ b/Raven.Migrations/DependencyInjectionMigrationResolver.cs @@ -1,6 +1,4 @@ using System; -using System.Collections.Generic; -using System.Text; namespace Raven.Migrations { diff --git a/Raven.Migrations/MigrationRunner.cs b/Raven.Migrations/MigrationRunner.cs index 3e3e62d..ba2a280 100644 --- a/Raven.Migrations/MigrationRunner.cs +++ b/Raven.Migrations/MigrationRunner.cs @@ -89,7 +89,7 @@ void ExecuteMigration(Directions direction, long version, Migration migration, A if (migrationDoc == null) { skipCount++; - continue; + break; } ExecuteMigration(options.Direction, pair.Attribute!.Version, migration, () => { @@ -103,7 +103,7 @@ void ExecuteMigration(Directions direction, long version, Migration migration, A if (migrationDoc != null) { skipCount++; - continue; + break; } ExecuteMigration(options.Direction, pair.Attribute!.Version, migration, () => { diff --git a/Raven.Migrations/Raven.Migrations.csproj b/Raven.Migrations/Raven.Migrations.csproj index bbf2b06..ae1af08 100644 --- a/Raven.Migrations/Raven.Migrations.csproj +++ b/Raven.Migrations/Raven.Migrations.csproj @@ -1,8 +1,8 @@ - + net8.0 true - 6.0.1 + 6.0.2 RavenMigrations Darrel Portzline, Khalid Abuhakmeh, Judah Gabriel Himango BitShuva @@ -31,10 +31,10 @@ readme.md - - - - + + + +