source static method

String source([
  1. List<String> options = const <String>[]
])

the migration file. options are the named arguments of AccessTokenTables.up, like uuidIds: true.

Implementation

static String source([List<String> options = const <String>[]]) {
  String args = <String>['schema', ...options].join(', ');
  return '''
// ignore_for_file: file_names
import 'package:dox_auth/dox_auth.dart';
import 'package:dox_migration/dox_migration.dart';

/// The auth_access_tokens table of dox_auth.
class CreateAccessTokensTable extends Migration {
@override
Future<void> up(Schema schema) async {
  await AccessTokenTables.up($args);
}

@override
Future<void> down(Schema schema) async {
  await AccessTokenTables.down(schema);
}
}
''';
}