platform/lib/migrations/todo.dart

22 lines
479 B
Dart
Raw Normal View History

2016-09-19 03:46:53 +00:00
import 'dart:async';
import 'package:furlong/furlong.dart';
class TodoMigration extends Migration {
String get name => "Todos table";
@override
Future create(Migrator migrator) async {
migrator.create("todos", (table) {
table.id();
table.varChar("group_id").nullable = true;
table.varChar("title").nullable = true;
table.varChar("text");
});
}
@override
Future destroy(Migrator migrator) async {
migrator.drop(["todos"]);
}
}