/// <summary> /// Applies any migrational changes from older to newer versions /// </summary> void migrateUsers() { var target = CoreSettings.GetInt("Version", 0) + 1; switch (target) { case 1: migSetupUserSQLite(); migUserIniToSQLite(); break; } }
/// <summary> /// Iterates through all services and invokes any migrations they contain /// </summary> void migrateServices() { var migration = CoreSettings.GetInt("Version", 0); if (migration >= MigrationVersion) { return; } foreach (var service in Services) { for (var i = migration; i < MigrationVersion; i++) { service.Migrate(this, i + 1); Log.Fine("Services", "Migrated '{0}' to version {1}", service.Name, i + 1); } } Log.Debug("Services", "All services migrated to version {0}", MigrationVersion); }