Skip to content

A platform for community discussion. Free, open, simple.

FIX: Remove google+ from share_links site setting

Gerhard Schlagerf43345b75a87
diff --git a/db/migrate/20190110201340_remove_google_plus_from_share_links_site_setting.rb b/db/migrate/20190110201340_remove_google_plus_from_share_links_site_setting.rb
new file mode 100644
index 00000000000..b6268b737a5
--- /dev/null
+++ b/db/migrate/20190110201340_remove_google_plus_from_share_links_site_setting.rb
@@ -0,0 +1,13 @@
+class RemoveGooglePlusFromShareLinksSiteSetting < ActiveRecord::Migration[5.2]
+ def up
+ execute <<~SQL
+ UPDATE site_settings
+ SET value = array_to_string(array_remove(regexp_split_to_array(value, '\\|'), 'google+'), '|')
+ WHERE name = 'share_links'
+ SQL
+ end
+
+ def down
+ raise ActiveRecord::IrreversibleMigration
+ end
+end