Skip to content

Commit

Permalink
[#82] remove create from enhanced tasks and seed requires create to h…
Browse files Browse the repository at this point in the history
…ave run
  • Loading branch information
rpbaltazar committed Jun 27, 2020
1 parent a1de9d6 commit b6af077
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/apartment/tasks/enhancements.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Apartment
class RakeTaskEnhancer
module TASKS
ENHANCE_BEFORE = %w[db:drop].freeze
ENHANCE_AFTER = %w[db:create db:migrate db:rollback db:migrate:up db:migrate:down db:migrate:redo db:seed].freeze
ENHANCE_AFTER = %w[db:migrate db:rollback db:migrate:up db:migrate:down db:migrate:redo db:seed].freeze
freeze
end

Expand Down
4 changes: 3 additions & 1 deletion lib/tasks/apartment.rake
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ require 'parallel'
apartment_namespace = namespace :apartment do
desc 'Create all tenants'
task :create do
Apartment::TaskHelper.warn_if_tenants_empty

Apartment::TaskHelper.tenants.each do |tenant|
begin
puts("Creating #{tenant} tenant")
Expand Down Expand Up @@ -43,7 +45,7 @@ apartment_namespace = namespace :apartment do
end

desc 'Seed all tenants'
task :seed do
task seed: :create do
Apartment::TaskHelper.warn_if_tenants_empty

Apartment::TaskHelper.each_tenant do |tenant|
Expand Down

0 comments on commit b6af077

Please sign in to comment.