Class: Rsodx::Cli::Commands::Db::Migrate
- Inherits:
-
Dry::CLI::Command
- Object
- Dry::CLI::Command
- Rsodx::Cli::Commands::Db::Migrate
- Defined in:
- lib/rsodx/cli/commands/db/migrate.rb
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/rsodx/cli/commands/db/migrate.rb', line 7 def call(*) project_root = Rsodx.project_root environment_path = File.join(project_root, "config", "environment.rb") unless File.exist?(environment_path) abort "❌ Could not find config/environment.rb in #{project_root}" end require environment_path Sequel::Migrator.run(Rsodx::Connect.db, "db/migrations") end |