mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-12 03:50:22 +00:00
Update links to n8n server
This commit is contained in:
17
db/migrate/20240502035220_update_n8n_url.rb
Normal file
17
db/migrate/20240502035220_update_n8n_url.rb
Normal file
@@ -0,0 +1,17 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# We got a new n8n server.
|
||||
# But we still have some database rows with a URL to the old server.
|
||||
class UpdateN8nUrl < ActiveRecord::Migration[7.0]
|
||||
def up
|
||||
execute <<~SQL.squish
|
||||
UPDATE connected_apps
|
||||
SET data = replace(
|
||||
data::text,
|
||||
'n8n.openfoodnetwork.org.uk',
|
||||
'n8n.openfoodnetwork.org'
|
||||
)::jsonb
|
||||
WHERE data IS NOT NULL;
|
||||
SQL
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user