2016-09-19 03:46:53 +00:00
|
|
|
import 'package:angel/migrations/migrations.dart';
|
|
|
|
import 'package:furlong/furlong.dart';
|
2016-09-17 19:51:29 +00:00
|
|
|
import 'package:grinder/grinder.dart';
|
|
|
|
|
2016-09-19 03:46:53 +00:00
|
|
|
final List<Migration> migrations = [
|
|
|
|
// Your migrations here!
|
|
|
|
];
|
|
|
|
|
2016-09-17 19:51:29 +00:00
|
|
|
main(args) => grind(args);
|
|
|
|
|
|
|
|
@Task()
|
|
|
|
test() => new TestRunner().testAsync();
|
|
|
|
|
|
|
|
@DefaultTask()
|
|
|
|
@Depends(test)
|
|
|
|
build() {
|
|
|
|
Pub.build();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Task()
|
|
|
|
clean() => defaultClean();
|
2016-09-19 03:46:53 +00:00
|
|
|
|
|
|
|
@Task("Generates classes from your Furlong migrations.")
|
|
|
|
generate() async {}
|
|
|
|
|
|
|
|
@Task("Reverts the database state to before any Furlong migrations were run.")
|
|
|
|
down() => migrateDown(migrations);
|
|
|
|
|
|
|
|
@Task("Undoes and re-runs all Furlong migrations.")
|
|
|
|
reset() => migrateReset(migrations);
|
|
|
|
|
|
|
|
@Task("Undoes the last batch of Furlong migrations run.")
|
|
|
|
revert() => migrateRevert(migrations);
|
|
|
|
|
|
|
|
@Task("Runs any outstanding Furlong migrations.")
|
|
|
|
up() => migrateUp(migrations);
|