From 1e084ec4d64bb8e233173610831c6b6a4e040415 Mon Sep 17 00:00:00 2001 From: thosakwe Date: Sun, 18 Sep 2016 23:49:26 -0400 Subject: [PATCH] Destroy sample migrations --- lib/migrations/group.dart | 19 ------------------- lib/migrations/migrations.dart | 2 -- lib/migrations/todo.dart | 21 --------------------- tool/grind.dart | 4 ---- 4 files changed, 46 deletions(-) delete mode 100644 lib/migrations/group.dart delete mode 100644 lib/migrations/todo.dart diff --git a/lib/migrations/group.dart b/lib/migrations/group.dart deleted file mode 100644 index 662fde38..00000000 --- a/lib/migrations/group.dart +++ /dev/null @@ -1,19 +0,0 @@ -import 'dart:async'; -import 'package:furlong/furlong.dart'; - -class GroupMigration extends Migration { - String get name => "Groups table"; - - @override - Future create(Migrator migrator) async { - migrator.create("groups", (table) { - table.id(); - table.varChar("name"); - }); - } - - @override - Future destroy(Migrator migrator) async { - migrator.drop(["groups"]); - } -} diff --git a/lib/migrations/migrations.dart b/lib/migrations/migrations.dart index 6f347e8b..bd82b9ac 100644 --- a/lib/migrations/migrations.dart +++ b/lib/migrations/migrations.dart @@ -6,8 +6,6 @@ import 'package:angel_configuration/angel_configuration.dart'; import 'package:angel_framework/angel_framework.dart'; import 'package:furlong/furlong.dart'; import 'package:sqljocky/sqljocky.dart'; -export 'group.dart'; -export 'todo.dart'; Future createPool() async { var app = new Angel(); diff --git a/lib/migrations/todo.dart b/lib/migrations/todo.dart deleted file mode 100644 index 139696ec..00000000 --- a/lib/migrations/todo.dart +++ /dev/null @@ -1,21 +0,0 @@ -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"]); - } -} diff --git a/tool/grind.dart b/tool/grind.dart index 602f2ce2..fba5f057 100644 --- a/tool/grind.dart +++ b/tool/grind.dart @@ -1,13 +1,9 @@ -import 'dart:async'; -import 'dart:io'; import 'package:angel/migrations/migrations.dart'; import 'package:furlong/furlong.dart'; import 'package:grinder/grinder.dart'; final List migrations = [ // Your migrations here! - new GroupMigration(), - new TodoMigration() ]; main(args) => grind(args);