createMigrator method

  1. @protected
  2. @visibleForTesting
Migrator createMigrator()
inherited

Creates a Migrator with the provided query executor. Migrators generate sql statements to create or drop tables.

This api is mainly used internally in drift, especially to implement the beforeOpen callback from the database site. However, it can also be used if you need to create tables manually and outside of a MigrationStrategy. For almost all use cases, overriding migration should suffice.

Implementation

@protected
@visibleForTesting
Migrator createMigrator() => Migrator(this);