提交 94175c0e 编写于 作者: K Kevin Skoglund 提交者: Santiago Pastorino

Improve regex in rake db:migrate status [#5940 state:resolved]

[#5940 state:committed]
Signed-off-by: NSantiago Pastorino <santiago@wyeworks.com>
上级 89962d82
......@@ -193,7 +193,7 @@ db_namespace = namespace :db do
file_list = []
Dir.foreach(File.join(Rails.root, 'db', 'migrate')) do |file|
# only files matching "20091231235959_some_name.rb" pattern
if match_data = /(\d{14})_(.+)\.rb/.match(file)
if match_data = /^(\d{14})_(.+)\.rb$/.match(file)
status = db_list.delete(match_data[1]) ? 'up' : 'down'
file_list << [status, match_data[1], match_data[2]]
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册