From 9ead3b5e8d8ea4cc5cf150b1b57c00aa4c6fd4ec Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 30 Mar 2022 10:24:25 +0200 Subject: [PATCH] (db) add profile_url to OpenIdConnectProvider --- app/models/open_id_connect_provider.rb | 2 +- ...141618_create_open_id_connect_providers.rb | 1 + db/schema.rb | 19 ++++++++++--------- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/app/models/open_id_connect_provider.rb b/app/models/open_id_connect_provider.rb index 793e5974f..39e4bf4c1 100644 --- a/app/models/open_id_connect_provider.rb +++ b/app/models/open_id_connect_provider.rb @@ -18,7 +18,7 @@ class OpenIdConnectProvider < ApplicationRecord validates :prompt, inclusion: { in: %w[none login consent select_account], allow_nil: true } def config - OpenIdConnectProvider.columns.map(&:name).filter { |n| !n.start_with?('client_') }.map do |n| + OpenIdConnectProvider.columns.map(&:name).filter { |n| !n.start_with?('client_') && n != 'profile_url' }.map do |n| [n, send(n)] end.push(['client_options', client_config]).to_h end diff --git a/db/migrate/20220328141618_create_open_id_connect_providers.rb b/db/migrate/20220328141618_create_open_id_connect_providers.rb index 9d04d1ce0..c2ede56f7 100644 --- a/db/migrate/20220328141618_create_open_id_connect_providers.rb +++ b/db/migrate/20220328141618_create_open_id_connect_providers.rb @@ -29,6 +29,7 @@ class CreateOpenIdConnectProviders < ActiveRecord::Migration[5.2] t.string :client_userinfo_endpoint t.string :client_jwks_uri t.string :client_end_session_endpoint + t.string :profile_url t.timestamps end diff --git a/db/schema.rb b/db/schema.rb index ec9e9a11e..38c9a208c 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -19,8 +19,8 @@ ActiveRecord::Schema.define(version: 2022_03_28_145017) do enable_extension "unaccent" create_table "abuses", id: :serial, force: :cascade do |t| - t.string "signaled_type" t.integer "signaled_id" + t.string "signaled_type" t.string "first_name" t.string "last_name" t.string "email" @@ -49,8 +49,8 @@ ActiveRecord::Schema.define(version: 2022_03_28_145017) do t.string "locality" t.string "country" t.string "postal_code" - t.string "placeable_type" t.integer "placeable_id" + t.string "placeable_type" t.datetime "created_at" t.datetime "updated_at" end @@ -64,8 +64,8 @@ ActiveRecord::Schema.define(version: 2022_03_28_145017) do end create_table "assets", id: :serial, force: :cascade do |t| - t.string "viewable_type" t.integer "viewable_id" + t.string "viewable_type" t.string "attachment" t.string "type" t.datetime "created_at" @@ -146,8 +146,8 @@ ActiveRecord::Schema.define(version: 2022_03_28_145017) do end create_table "credits", id: :serial, force: :cascade do |t| - t.string "creditable_type" t.integer "creditable_id" + t.string "creditable_type" t.integer "plan_id" t.integer "hours" t.datetime "created_at" @@ -369,15 +369,15 @@ ActiveRecord::Schema.define(version: 2022_03_28_145017) do create_table "notifications", id: :serial, force: :cascade do |t| t.integer "receiver_id" - t.string "attached_object_type" t.integer "attached_object_id" + t.string "attached_object_type" t.integer "notification_type_id" t.boolean "is_read", default: false t.datetime "created_at" t.datetime "updated_at" t.string "receiver_type" t.boolean "is_send", default: false - t.jsonb "meta_data", default: "{}" + t.jsonb "meta_data", default: {} t.index ["notification_type_id"], name: "index_notifications_on_notification_type_id" t.index ["receiver_id"], name: "index_notifications_on_receiver_id" end @@ -436,6 +436,7 @@ ActiveRecord::Schema.define(version: 2022_03_28_145017) do t.string "client_userinfo_endpoint" t.string "client_jwks_uri" t.string "client_end_session_endpoint" + t.string "profile_url" t.datetime "created_at", null: false t.datetime "updated_at", null: false end @@ -570,8 +571,8 @@ ActiveRecord::Schema.define(version: 2022_03_28_145017) do create_table "prices", id: :serial, force: :cascade do |t| t.integer "group_id" t.integer "plan_id" - t.string "priceable_type" t.integer "priceable_id" + t.string "priceable_type" t.integer "amount" t.datetime "created_at", null: false t.datetime "updated_at", null: false @@ -681,8 +682,8 @@ ActiveRecord::Schema.define(version: 2022_03_28_145017) do t.text "message" t.datetime "created_at" t.datetime "updated_at" - t.string "reservable_type" t.integer "reservable_id" + t.string "reservable_type" t.integer "nb_reserve_places" t.integer "statistic_profile_id" t.index ["reservable_type", "reservable_id"], name: "index_reservations_on_reservable_type_and_reservable_id" @@ -691,8 +692,8 @@ ActiveRecord::Schema.define(version: 2022_03_28_145017) do create_table "roles", id: :serial, force: :cascade do |t| t.string "name" - t.string "resource_type" t.integer "resource_id" + t.string "resource_type" t.datetime "created_at" t.datetime "updated_at" t.index ["name", "resource_type", "resource_id"], name: "index_roles_on_name_and_resource_type_and_resource_id"