From 2a81ca3871763aec454224208b063ba77fac122e Mon Sep 17 00:00:00 2001 From: simon lehericey Date: Mon, 18 Mar 2024 14:47:52 +0100 Subject: [PATCH] relax agent connect constraints --- ...34256_remove_constraint_on_agent_connect_information.rb | 7 +++++++ db/schema.rb | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 db/migrate/20240318134256_remove_constraint_on_agent_connect_information.rb diff --git a/db/migrate/20240318134256_remove_constraint_on_agent_connect_information.rb b/db/migrate/20240318134256_remove_constraint_on_agent_connect_information.rb new file mode 100644 index 000000000..6ea27c9db --- /dev/null +++ b/db/migrate/20240318134256_remove_constraint_on_agent_connect_information.rb @@ -0,0 +1,7 @@ +class RemoveConstraintOnAgentConnectInformation < ActiveRecord::Migration[7.0] + def change + # make given_name, usual_name nullable + change_column_null :agent_connect_informations, :given_name, true + change_column_null :agent_connect_informations, :usual_name, true + end +end diff --git a/db/schema.rb b/db/schema.rb index 33a0a8bb4..0e61d3679 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.0].define(version: 2024_03_18_092147) do +ActiveRecord::Schema[7.0].define(version: 2024_03_18_134256) do # These are extensions that must be enabled in order to support this database enable_extension "pgcrypto" enable_extension "plpgsql" @@ -95,14 +95,14 @@ ActiveRecord::Schema[7.0].define(version: 2024_03_18_092147) do t.string "belonging_population" t.datetime "created_at", null: false t.string "email", null: false - t.string "given_name", null: false + t.string "given_name" t.bigint "instructeur_id", null: false t.string "organizational_unit" t.string "phone" t.string "siret" t.string "sub", null: false t.datetime "updated_at", null: false - t.string "usual_name", null: false + t.string "usual_name" t.index ["instructeur_id"], name: "index_agent_connect_informations_on_instructeur_id" end