mirror of
https://github.com/discourse/discourse-adplugin.git
synced 2025-03-09 13:19:11 +00:00
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:
parent
6f8ff34ffa
commit
6b5412826f
@ -8,7 +8,7 @@ class MigrateTlToGroupSettingsAdsenseThroughTl < ActiveRecord::Migration[7.0]
|
|||||||
).first
|
).first
|
||||||
|
|
||||||
if adsense_through_trust_level_raw.present?
|
if adsense_through_trust_level_raw.present?
|
||||||
adsense_through_allowed_groups =
|
adsense_display_groups =
|
||||||
case adsense_through_trust_level_raw
|
case adsense_through_trust_level_raw
|
||||||
when "0"
|
when "0"
|
||||||
"10"
|
"10"
|
||||||
@ -22,9 +22,9 @@ class MigrateTlToGroupSettingsAdsenseThroughTl < ActiveRecord::Migration[7.0]
|
|||||||
"10|11|12|13|14"
|
"10|11|12|13|14"
|
||||||
end
|
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)
|
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
|
SQL
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -8,7 +8,7 @@ class MigrateTlToGroupSettingsDfpThroughTl < ActiveRecord::Migration[7.0]
|
|||||||
).first
|
).first
|
||||||
|
|
||||||
if dfp_through_trust_level_raw.present?
|
if dfp_through_trust_level_raw.present?
|
||||||
dfp_through_allowed_groups =
|
dfp_display_groups =
|
||||||
case dfp_through_trust_level_raw
|
case dfp_through_trust_level_raw
|
||||||
when "0"
|
when "0"
|
||||||
"10"
|
"10"
|
||||||
@ -22,9 +22,9 @@ class MigrateTlToGroupSettingsDfpThroughTl < ActiveRecord::Migration[7.0]
|
|||||||
"10|11|12|13|14"
|
"10|11|12|13|14"
|
||||||
end
|
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)
|
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
|
SQL
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -8,7 +8,7 @@ class MigrateTlToGroupSettingsAmazonThroughTl < ActiveRecord::Migration[7.0]
|
|||||||
).first
|
).first
|
||||||
|
|
||||||
if amazon_through_trust_level_raw.present?
|
if amazon_through_trust_level_raw.present?
|
||||||
amazon_through_allowed_groups =
|
amazon_display_groups =
|
||||||
case amazon_through_trust_level_raw
|
case amazon_through_trust_level_raw
|
||||||
when "0"
|
when "0"
|
||||||
"10"
|
"10"
|
||||||
@ -22,9 +22,9 @@ class MigrateTlToGroupSettingsAmazonThroughTl < ActiveRecord::Migration[7.0]
|
|||||||
"10|11|12|13|14"
|
"10|11|12|13|14"
|
||||||
end
|
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)
|
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
|
SQL
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -8,7 +8,7 @@ class MigrateTlToGroupSettingsCarbonadsThroughTl < ActiveRecord::Migration[7.0]
|
|||||||
).first
|
).first
|
||||||
|
|
||||||
if carbonads_through_trust_level_raw.present?
|
if carbonads_through_trust_level_raw.present?
|
||||||
carbonads_through_allowed_groups =
|
carbonads_display_groups =
|
||||||
case carbonads_through_trust_level_raw
|
case carbonads_through_trust_level_raw
|
||||||
when "0"
|
when "0"
|
||||||
"10"
|
"10"
|
||||||
@ -22,9 +22,9 @@ class MigrateTlToGroupSettingsCarbonadsThroughTl < ActiveRecord::Migration[7.0]
|
|||||||
"10|11|12|13|14"
|
"10|11|12|13|14"
|
||||||
end
|
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)
|
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
|
SQL
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -8,7 +8,7 @@ class MigrateTlToGroupSettingsAdbutlerThroughTl < ActiveRecord::Migration[7.0]
|
|||||||
).first
|
).first
|
||||||
|
|
||||||
if adbutler_through_trust_level_raw.present?
|
if adbutler_through_trust_level_raw.present?
|
||||||
adbutler_through_allowed_groups =
|
adbutler_display_groups =
|
||||||
case adbutler_through_trust_level_raw
|
case adbutler_through_trust_level_raw
|
||||||
when "0"
|
when "0"
|
||||||
"10"
|
"10"
|
||||||
@ -22,9 +22,9 @@ class MigrateTlToGroupSettingsAdbutlerThroughTl < ActiveRecord::Migration[7.0]
|
|||||||
"10|11|12|13|14"
|
"10|11|12|13|14"
|
||||||
end
|
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)
|
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
|
SQL
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user