YaroormConfig constructor

YaroormConfig(
  1. String defaultConnName, {
  2. required List<DatabaseConnection> connections,
  3. String migrationsTable = 'migrations',
  4. List<Migration> migrations = const [],
})

Implementation

YaroormConfig(
  this.defaultConnName, {
  required this.connections,
  this.migrationsTable = 'migrations',
  this.migrations = const [],
}) {
  final hasDefault = connections.any((e) => e.name == defaultConnName);
  if (!hasDefault) {
    throw ArgumentError(
        'Database connection info not found for $defaultConnName');
  }
}