Skip to content
Snippets Groups Projects
Verified Commit b73c5c00 authored by Chad Woolley's avatar Chad Woolley :one: Committed by GitLab
Browse files

Improve scripts/database/migrate.rb

parent 433aaaca
No related branches found
No related tags found
3 merge requests!181325Fix ambiguous `created_at` in project.rb,!179611Draft: Rebase CR approach for zoekt assignments,!177533Improve scripts/database/migrate.rb
......@@ -46,7 +46,7 @@ def parse_options
opts.on('--debug', 'Enable debug mode') do |v|
options[:debug] = v
end
opts.on('-t', '--task=TASK', 'Set task') do |v|
opts.on('-t', '--task=[up|down]', 'Set task - "up" to migrate forward, "down" to rollback') do |v|
options[:task] = v
end
end.parse!
......@@ -125,6 +125,9 @@ def execute
puts "$ #{cmd}"
raise "Migration #{version} failed" unless system(cmd)
end
else
puts 'Invalid task. Use --task=[up|down]'
exit 1
end
end
# rubocop:enable Metrics/CyclomaticComplexity,Metrics/PerceivedComplexity
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment