lib/tasks/penthouse.rake in penthouse-0.4.1 vs lib/tasks/penthouse.rake in penthouse-0.4.2

- old
+ new

@@ -6,11 +6,11 @@ task :migrate do warn_if_tenants_empty tenant_identifiers.each do |tenant_identifier| begin - puts("Migrating #{tenant_identifier} tenant") + puts("Migrating #{tenant_identifier || '***global***'} tenant") Penthouse::Migrator.migrate(tenant_identifier) rescue Penthouse::TenantNotFound => e puts e.message end end @@ -22,11 +22,11 @@ step = ENV['STEP'] ? ENV['STEP'].to_i : 1 tenant_identifiers.each do |tenant_identifier| begin - puts("Rolling back #{tenant_identifier} tenant") + puts("Rolling back #{tenant_identifier || '***global***'} tenant") Penthouse::Migrator.rollback(tenant_identifier, step) rescue Penthouse::TenantNotFound => e puts e.message end end @@ -40,11 +40,11 @@ version = ENV['VERSION'] ? ENV['VERSION'].to_i : nil raise 'VERSION is required' unless version tenant_identifiers.each do |tenant_identifier| begin - puts("Migrating #{tenant_identifier} tenant up") + puts("Migrating #{tenant_identifier || '***global***'} tenant up") Penthouse::Migrator.run(:up, tenant_identifier, version) rescue Penthouse::TenantNotFound => e puts e.message end end @@ -57,10 +57,10 @@ version = ENV['VERSION'] ? ENV['VERSION'].to_i : nil raise 'VERSION is required' unless version tenant_identifiers.each do |tenant_identifier| begin - puts("Migrating #{tenant_identifier} tenant down") + puts("Migrating #{tenant_identifier || '***global***'} tenant down") Penthouse::Migrator.run(:down, tenant_identifier, version) rescue Penthouse::TenantNotFound => e puts e.message end end