FIX: Ignore non-numeric values when migrating from old data format
This fixes 'invalid input syntax for integer' errors when the old data is invalid
This commit is contained in:
parent
e49eb3bd9f
commit
550d0bdee1
|
@ -17,6 +17,7 @@ class MoveToManagedAuthenticator < ActiveRecord::Migration[5.2]
|
|||
CURRENT_TIMESTAMP
|
||||
FROM plugin_store_rows
|
||||
WHERE plugin_name = 'oauth2_basic'
|
||||
AND value::json->>'user_id' ~ '^[0-9]+$'
|
||||
ON CONFLICT (provider_name, user_id)
|
||||
DO NOTHING
|
||||
SQL
|
||||
|
|
Loading…
Reference in New Issue