Skip to content

Commit b90a7f8

Browse files
authored
Merge pull request #194 from seand7565/add_skip_migrations_option
Add option to skip migrations
2 parents 0b663ff + 8f96456 commit b90a7f8

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

lib/generators/solidus/auth/install/install_generator.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ module Auth
55
module Generators
66
class InstallGenerator < Rails::Generators::Base
77
class_option :auto_run_migrations, type: :boolean, default: false
8+
class_option :skip_migrations, type: :boolean, default: false
89

910
def self.source_paths
1011
paths = superclass.source_paths
@@ -21,6 +22,8 @@ def add_migrations
2122
end
2223

2324
def run_migrations
25+
return if options[:skip_migrations]
26+
2427
run_migrations = options[:auto_run_migrations] || ['', 'y', 'Y'].include?(ask('Would you like to run the migrations now? [Y/n]'))
2528
if run_migrations
2629
run 'bundle exec rake db:migrate'

0 commit comments

Comments
 (0)