diff options
author | Bouke van der Bijl <boukevanderbijl@gmail.com> | 2016-11-01 14:29:29 -0400 |
---|---|---|
committer | Bouke van der Bijl <boukevanderbijl@gmail.com> | 2016-11-01 14:29:29 -0400 |
commit | de08be6af68373f6387854960ac967611d69ec9f (patch) | |
tree | e63fbbae6fba575c5d6870a8a42f5ef14d24e011 /railties/lib | |
parent | c7adc610f0233b9afd51a6d68aa9061cdb250fad (diff) | |
download | rails-de08be6af68373f6387854960ac967611d69ec9f.tar.gz rails-de08be6af68373f6387854960ac967611d69ec9f.tar.bz2 rails-de08be6af68373f6387854960ac967611d69ec9f.zip |
Don't put db:migrate and db:setup in binfiles if activerecord is excluded
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/bin/setup.tt (renamed from railties/lib/rails/generators/rails/app/templates/bin/setup) | 2 | ||||
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/bin/update.tt (renamed from railties/lib/rails/generators/rails/app/templates/bin/update) | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/railties/lib/rails/generators/rails/app/templates/bin/setup b/railties/lib/rails/generators/rails/app/templates/bin/setup.tt index acae810c1a..8635e97b76 100644 --- a/railties/lib/rails/generators/rails/app/templates/bin/setup +++ b/railties/lib/rails/generators/rails/app/templates/bin/setup.tt @@ -16,6 +16,7 @@ chdir APP_ROOT do puts '== Installing dependencies ==' system! 'gem install bundler --conservative' system('bundle check') || system!('bundle install') +<% unless options.skip_active_record -%> # puts "\n== Copying sample files ==" # unless File.exist?('config/database.yml') @@ -24,6 +25,7 @@ chdir APP_ROOT do puts "\n== Preparing database ==" system! 'bin/rails db:setup' +<% end -%> puts "\n== Removing old logs and tempfiles ==" system! 'bin/rails log:clear tmp:clear' diff --git a/railties/lib/rails/generators/rails/app/templates/bin/update b/railties/lib/rails/generators/rails/app/templates/bin/update.tt index 770a605fed..d385b363c6 100644 --- a/railties/lib/rails/generators/rails/app/templates/bin/update +++ b/railties/lib/rails/generators/rails/app/templates/bin/update.tt @@ -16,9 +16,11 @@ chdir APP_ROOT do puts '== Installing dependencies ==' system! 'gem install bundler --conservative' system('bundle check') || system!('bundle install') +<% unless options.skip_active_record -%> puts "\n== Updating database ==" system! 'bin/rails db:migrate' +<% end -%> puts "\n== Removing old logs and tempfiles ==" system! 'bin/rails log:clear tmp:clear' |