Permalink
Browse files

message on no migrations

  • Loading branch information...
1 parent 26092d6 commit cccc0013e1243ab180ac26bc9f21f06297c9b8bf @tj committed Apr 22, 2011
Showing with 7 additions and 1 deletion.
  1. +7 −1 bin/migrate
View
8 bin/migrate
@@ -131,7 +131,13 @@ var config = loadConfig();
var commands = {
up: function(){
-
+ // no migrations
+ if (-1 == config.prev) abort('add migrations before running $ migrate up');
+ },
+
+ down: function(){
+ // no migrations
+ if (-1 == config.prev) abort('add migrations before running $ migrate down');
},
create: function(){

0 comments on commit cccc001

Please sign in to comment.