From e1d4ed98594ec280b9221ead71f23dccd6bcf74a Mon Sep 17 00:00:00 2001 From: Ali Hadi Mazeh <91922430+alihadimazeh@users.noreply.github.com> Date: Tue, 13 Aug 2024 10:57:54 -0400 Subject: [PATCH] Delete db/data/20240806205559_add_domain_specific_email_signup_to_site_settings.rb --- ..._specific_email_signup_to_site_settings.rb | 23 ------------------- 1 file changed, 23 deletions(-) delete mode 100644 db/data/20240806205559_add_domain_specific_email_signup_to_site_settings.rb diff --git a/db/data/20240806205559_add_domain_specific_email_signup_to_site_settings.rb b/db/data/20240806205559_add_domain_specific_email_signup_to_site_settings.rb deleted file mode 100644 index a807ed80b3..0000000000 --- a/db/data/20240806205559_add_domain_specific_email_signup_to_site_settings.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -class AddDomainSpecificEmailSignupToSiteSettings < ActiveRecord::Migration[7.1] - def up - setting = Setting.find_or_create_by(name: 'SpecificEmailDomainSignUp') - - SiteSetting.create!(setting:, value: '', provider: 'greenlight') unless SiteSetting.exists?(setting:, provider: 'greenlight') - - Tenant.find_each do |tenant| - SiteSetting.create!(setting:, value: '', provider: tenant.name) unless SiteSetting.exists?(setting:, provider: tenant.name) - end - end - - def down - Tenant.find_each do |tenant| - SiteSetting.find_by(setting: Setting.find_by(name: 'Maintenance'), provider: tenant.name)&.destroy - end - - SiteSetting.find_by(setting: Setting.find_by(name: 'Maintenance'), provider: 'greenlight')&.destroy - - Setting.find_by(name: 'SpecificEmailDomainSignUp')&.destroy - end -end