DEV: Update migration to match new site settings (#196)

Forgot to update these values in the previous PR.

Follow up to: https://github.com/discourse/discourse-adplugin/pull/195
This commit is contained in:
Blake Erickson 2024-01-31 11:17:56 -07:00 committed by GitHub
parent 6f8ff34ffa
commit 6b5412826f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 15 additions and 15 deletions

View File

@ -8,7 +8,7 @@ class MigrateTlToGroupSettingsAdsenseThroughTl < ActiveRecord::Migration[7.0]
).first
if adsense_through_trust_level_raw.present?
adsense_through_allowed_groups =
adsense_display_groups =
case adsense_through_trust_level_raw
when "0"
"10"
@ -22,9 +22,9 @@ class MigrateTlToGroupSettingsAdsenseThroughTl < ActiveRecord::Migration[7.0]
"10|11|12|13|14"
end
DB.exec(<<~SQL, setting: adsense_through_allowed_groups)
DB.exec(<<~SQL, setting: adsense_display_groups)
INSERT INTO site_settings(name, value, data_type, created_at, updated_at)
VALUES('adsense_through_allowed_groups', :setting, '20', NOW(), NOW())
VALUES('adsense_display_groups', :setting, '20', NOW(), NOW())
SQL
end
end

View File

@ -8,7 +8,7 @@ class MigrateTlToGroupSettingsDfpThroughTl < ActiveRecord::Migration[7.0]
).first
if dfp_through_trust_level_raw.present?
dfp_through_allowed_groups =
dfp_display_groups =
case dfp_through_trust_level_raw
when "0"
"10"
@ -22,9 +22,9 @@ class MigrateTlToGroupSettingsDfpThroughTl < ActiveRecord::Migration[7.0]
"10|11|12|13|14"
end
DB.exec(<<~SQL, setting: dfp_through_allowed_groups)
DB.exec(<<~SQL, setting: dfp_display_groups)
INSERT INTO site_settings(name, value, data_type, created_at, updated_at)
VALUES('dfp_through_allowed_groups', :setting, '20', NOW(), NOW())
VALUES('dfp_display_groups', :setting, '20', NOW(), NOW())
SQL
end
end

View File

@ -8,7 +8,7 @@ class MigrateTlToGroupSettingsAmazonThroughTl < ActiveRecord::Migration[7.0]
).first
if amazon_through_trust_level_raw.present?
amazon_through_allowed_groups =
amazon_display_groups =
case amazon_through_trust_level_raw
when "0"
"10"
@ -22,9 +22,9 @@ class MigrateTlToGroupSettingsAmazonThroughTl < ActiveRecord::Migration[7.0]
"10|11|12|13|14"
end
DB.exec(<<~SQL, setting: amazon_through_allowed_groups)
DB.exec(<<~SQL, setting: amazon_display_groups)
INSERT INTO site_settings(name, value, data_type, created_at, updated_at)
VALUES('amazon_through_allowed_groups', :setting, '20', NOW(), NOW())
VALUES('amazon_display_groups', :setting, '20', NOW(), NOW())
SQL
end
end

View File

@ -8,7 +8,7 @@ class MigrateTlToGroupSettingsCarbonadsThroughTl < ActiveRecord::Migration[7.0]
).first
if carbonads_through_trust_level_raw.present?
carbonads_through_allowed_groups =
carbonads_display_groups =
case carbonads_through_trust_level_raw
when "0"
"10"
@ -22,9 +22,9 @@ class MigrateTlToGroupSettingsCarbonadsThroughTl < ActiveRecord::Migration[7.0]
"10|11|12|13|14"
end
DB.exec(<<~SQL, setting: carbonads_through_allowed_groups)
DB.exec(<<~SQL, setting: carbonads_display_groups)
INSERT INTO site_settings(name, value, data_type, created_at, updated_at)
VALUES('carbonads_through_allowed_groups', :setting, '20', NOW(), NOW())
VALUES('carbonads_display_groups', :setting, '20', NOW(), NOW())
SQL
end
end

View File

@ -8,7 +8,7 @@ class MigrateTlToGroupSettingsAdbutlerThroughTl < ActiveRecord::Migration[7.0]
).first
if adbutler_through_trust_level_raw.present?
adbutler_through_allowed_groups =
adbutler_display_groups =
case adbutler_through_trust_level_raw
when "0"
"10"
@ -22,9 +22,9 @@ class MigrateTlToGroupSettingsAdbutlerThroughTl < ActiveRecord::Migration[7.0]
"10|11|12|13|14"
end
DB.exec(<<~SQL, setting: adbutler_through_allowed_groups)
DB.exec(<<~SQL, setting: adbutler_display_groups)
INSERT INTO site_settings(name, value, data_type, created_at, updated_at)
VALUES('adbutler_through_allowed_groups', :setting, '20', NOW(), NOW())
VALUES('adbutler_display_groups', :setting, '20', NOW(), NOW())
SQL
end
end