public void When_project_has_migrations_Then_get_latest_version()
        {
            // Arrange
            OnSetUp(DocumentVersion.Empty());

            // Act
            var migrationVersion = _service.GetCurrentOrLatestMigrationVersion();

            // Assert
            migrationVersion.ToString().Should().Be("0.0.3");
        }
        public void Run(IMongoDatabase db)
        {
            _logger.LogInformation($"Database migration started.");
            var databaseVersion = _databaseVersionService.GetLatestDatabaseVersion(db);
            var currentOrLatest = _databaseVersionService.GetCurrentOrLatestMigrationVersion();

            if (databaseVersion == currentOrLatest)
            {
                return;
            }

            MigrateUpOrDown(db, databaseVersion, currentOrLatest);
            _logger.LogInformation($"Database migration finished.");
        }