2021-06-11 04:00:10 +00:00
|
|
|
import 'package:angel3_app/src/config/plugins/orm.dart';
|
|
|
|
import 'package:angel3_app/models.dart';
|
|
|
|
import 'package:angel3_configuration/angel3_configuration.dart';
|
|
|
|
import 'package:angel3_migration_runner/angel3_migration_runner.dart';
|
|
|
|
import 'package:angel3_migration_runner/postgres.dart';
|
2019-01-12 00:44:28 +00:00
|
|
|
import 'package:file/local.dart';
|
|
|
|
|
2021-02-19 14:34:24 +00:00
|
|
|
void main(List<String> args) async {
|
2019-01-12 00:44:28 +00:00
|
|
|
var fs = LocalFileSystem();
|
|
|
|
var configuration = await loadStandaloneConfiguration(fs);
|
|
|
|
var connection = await connectToPostgres(configuration);
|
|
|
|
var migrationRunner = PostgresMigrationRunner(connection, migrations: [
|
|
|
|
GreetingMigration(),
|
|
|
|
]);
|
|
|
|
return await runMigrations(migrationRunner, args);
|
|
|
|
}
|