1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-28 09:24:24 +01:00
fab-manager/db/migrate/20220531160223_change_oidc_scope_to_array.rb
Sylvain 2172c102c9 (bug) use arrays for OIDC scopes in front and DB.
Send the scope as a string separated with spaces to the OIDC provider.
2022-06-01 09:27:49 +02:00

10 lines
355 B
Ruby

# frozen_string_literal: true
# Previously, the OpenID Connect scope was a string, scopes were separated by commas.
# To be more fron-end friendly, we now use an array.
class ChangeOidcScopeToArray < ActiveRecord::Migration[5.2]
def change
change_column :open_id_connect_providers, :scope, "varchar[] USING (string_to_array(scope, ','))"
end
end