/// <summary> /// initialise une nouvelle instance la classe /// </summary> public DatabaseService(IMigrationService migrationService) { _databasePath = DependencyService.Get <IPlatFormService>().GetLocalFilePath("database.db"); using (var connection = Connnection()) { migrationService.Migrate(connection); } }
public void Run() { _migrationLocator.Locate(); _runtimeVersionLocator.Locate(); _collectionLocator.Locate(); _startUpVersionLocator.Locate(); _migrationService.Migrate(); }
public static void MigrateTo(IMigrationService migrationService, string connectionString, string migrationDefinitionResourceName, int? targetVersion) { WithResource(migrationDefinitionResourceName, delegate(Stream stream) { migrationService.Migrate(connectionString, targetVersion, new StreamReader(stream, Encoding.UTF8)); }); }
public void Run() { _documentMigrationLocator.Locate(); _databaseMigrationLocator.Locate(); _runtimeVersionLocator.Locate(); _collectionLocator.Locate(); _startUpVersionLocator.Locate(); _migrationService.Migrate(); }
public ActionResult MigrateRepo(GitMigrationRequest request) { var result = new WebResult(); try { var migrationResult = _migrationService.Migrate(request, NotifyUpdates); result.Error = !migrationResult.Success; result.Message = string.Join(Environment.NewLine, migrationResult.ErrorMessages.ToArray()); } catch (SvnMigrationException ex) { result.Error = true; result.Message = ex.Message; } return(Json(result)); }
public async Task <IActionResult> Migrate() { _migrationService.Migrate(); return(Ok("success")); }