runAndRecord method
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(PostgresSchema schema, String name, int batch) =>
connection.runTx((ctx) async {
await schema.run(ctx);
await ctx.execute(
Sql.named(
'INSERT INTO migrations (batch, path) VALUES (@batch, @path)',
),
parameters: {'batch': batch, 'path': name},
);
});