Permalink
Browse files

Fixed db:migrate:compact (table_regex was used before it was defined)

Signed-off-by: Brian Hogan / New Auburn Personal Computer Services <bphogan@gmail.com>
  • Loading branch information...
1 parent 12590c5 commit 4f10740dabad8c11a1f02e5afd2edd67a68491b6 @dtrueman dtrueman committed with Jun 5, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −2 tasks/db_migrate_merge.rake
@@ -15,9 +15,9 @@ namespace :db do
lines = file.split("\n")
index_regex = /add_index "(.*)", (.*):name => "(.*)"/
- tables = lines.collect{|line| " drop_table #{$1}" if line =~ table_regex }
-
table_regex = /create_table (.*),(.*)/
+
+ tables = lines.collect{|line| " drop_table #{$1}" if line =~ table_regex }
indexes = lines.collect{|line| " remove_index :#{$1}, :name => :#{$3}" if line =~ index_regex}
# hack to correct spacing so it "looks pretty"

0 comments on commit 4f10740

Please sign in to comment.