Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Resolves #82] Enhanced db create task breaks plugins compatibility #83

Merged
merged 1 commit into from
Jun 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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