runAndRecord method

  1. @override
Future<void> runAndRecord(
  1. SqliteSchema schema,
  2. String name,
  3. int batch
)
override

Runs schema, and records name in the migrations table in batch: in one transaction, if the database changes its tables in one.

Implementation

@override
Future<void> runAndRecord(SqliteSchema schema, String name, int batch) =>
    _inSavepoint(() {
      schema.run(database);
      database.execute('INSERT INTO migrations (batch, path) VALUES (?, ?)', [
        batch,
        name,
      ]);
    });