reset method

  1. @override
Future<void> reset(
  1. Map<String, Object?> options
)

Destroys the database described by options so database reset can rebuild it from scratch by re-running migrations.

Implementation

@override
Future<void> reset(Map<String, Object?> options) async {
  final connection = await open(options);
  try {
    await connection.executeSql(
      'DROP SCHEMA public CASCADE; CREATE SCHEMA public;',
    );
  } finally {
    await connection.close();
  }
}