universal_migration_engine 0.1.0 copy "universal_migration_engine: ^0.1.0" to clipboard
universal_migration_engine: ^0.1.0 copied to clipboard

discontinued

A flexible migration framework that can plug into any new or existing project, and be compatible with any framework, whether it be SQL no-SQL or something else.

example/example.dart

import 'package:universal_migration_engine/data/dto/migration.dart';
import 'package:universal_migration_engine/migration_engine.dart';
import 'package:universal_migration_engine/schema.dart';
import 'package:universal_migration_engine/universal_migration_engine.dart';

Future<void> addNewUserColumn(Object? obj) async {
  // Add new user column
}

Future<void> migrateCustomerSQLTableToHive(Object? obj) async {
  // Migrate the Customer SQL table to Hive
}

Object? context;

void main() async {
  Migration migration = Migration("Add New User Column", addNewUserColumn);
  Migration migration2 = Migration(
      "Migrate the Customer SQL table to Hive", migrateCustomerSQLTableToHive);
  Schema schema = Schema("Example", [migration, migration2], context);
  UniversalMigrationEngine ume = await UniversalMigrationEngine.create(
      MigrationEngine(),
      () => UniversalMigrationEngine.isFirstApplicationStart(),
      schemas: [schema]);
  await ume.run();
}
0
likes
130
points
3
downloads

Publisher

unverified uploader

Weekly Downloads

A flexible migration framework that can plug into any new or existing project, and be compatible with any framework, whether it be SQL no-SQL or something else.

Repository (GitLab)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

cool_tools, drift, equatable, flutter, get_it, logger, path, path_provider, path_provider_android, path_provider_foundation, path_provider_windows, shared_preferences, tuple

More

Packages that depend on universal_migration_engine