loadInstalledVersions method
Future<List<DatabaseMigrationVersionModel> >
loadInstalledVersions(
- DatabaseSession session, {
- Transaction? transaction,
Loads the installed versions of the migrations from the database.
Implementation
Future<List<DatabaseMigrationVersionModel>> loadInstalledVersions(
DatabaseSession session, {
Transaction? transaction,
}) async {
final result = await session.db.unsafeQuery(
'SELECT module, version FROM $_migrationVersionTable',
transaction: transaction,
);
return [
for (final row in result)
DatabaseMigrationVersionModel.fromJson(row.toColumnMap()),
];
}