Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FI-2765: Automatically run migrations #496

Merged
merged 1 commit into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/inferno/apps/cli/main.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ module CLI
class Main < Thor
desc 'console', 'Start an interactive console session with Inferno'
def console
Migration.new.run(Logger::INFO)
Console.new.run
end

Expand All @@ -25,6 +26,7 @@ def migrate
type: :boolean,
desc: 'Automatically restart Inferno when a file is changed.'
def start
Migration.new.run(Logger::INFO)
command = 'foreman start --env=/dev/null'
if `gem list -i foreman`.chomp == 'false'
puts "You must install foreman with 'gem install foreman' prior to running Inferno."
Expand Down
4 changes: 2 additions & 2 deletions lib/inferno/apps/cli/migration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
module Inferno
module CLI
class Migration
def run
def run(log_level = Logger::DEBUG)
Inferno::Application.start(:logging)
Inferno::Application['logger'].level = Logger::DEBUG
Inferno::Application['logger'].level = log_level

Utils::Migration.new.run
end
Expand Down
Loading