discourse/migrations/lib/cli/import_command.rb
Gerhard Schlager 75f4a14568
FIX: migrations-tooling CLI didn't work anymore (#29777)
The previous approach of splitting Thor commands into multiple files caused problems when the same method name was used in multiple commands.

This also loads the Rails environment only for commands that need it. That makes the CLI boot faster for most commands or when the help should be shown. That's also why we can't use `Rails.root` in the CLI.
2024-11-19 23:51:53 +01:00

19 lines
372 B
Ruby

# frozen_string_literal: true
require "extralite"
module Migrations::CLI
class ImportCommand
def initialize(options)
@options = options
end
def execute
::Migrations.load_rails_environment
puts "Importing into Discourse #{Discourse::VERSION::STRING}"
puts "Extralite SQLite version: #{Extralite.sqlite3_version}"
end
end
end