From 2a1e16e8484fb0e9dc0adafc1afd06f192f9b201 Mon Sep 17 00:00:00 2001 From: mamadoudicko Date: Tue, 24 Oct 2023 14:35:30 +0200 Subject: [PATCH 1/2] feat(cms): update content type --- .../content-types/security-question/schema.json | 2 +- cms/quivr/types/generated/contentTypes.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cms/quivr/src/api/security-question/content-types/security-question/schema.json b/cms/quivr/src/api/security-question/content-types/security-question/schema.json index f182669884b2..07ecd3cbd2f9 100644 --- a/cms/quivr/src/api/security-question/content-types/security-question/schema.json +++ b/cms/quivr/src/api/security-question/content-types/security-question/schema.json @@ -30,7 +30,7 @@ "localized": true } }, - "type": "string" + "type": "text" } } } diff --git a/cms/quivr/types/generated/contentTypes.d.ts b/cms/quivr/types/generated/contentTypes.d.ts index 130392d602eb..745c7f80139d 100644 --- a/cms/quivr/types/generated/contentTypes.d.ts +++ b/cms/quivr/types/generated/contentTypes.d.ts @@ -823,7 +823,7 @@ export interface ApiSecurityQuestionSecurityQuestion localized: true; }; }>; - answer: Attribute.String & + answer: Attribute.Text & Attribute.SetPluginOptions<{ i18n: { localized: true; From 47b6d8c856d5600f4d9ff7dc9f774160c4926517 Mon Sep 17 00:00:00 2001 From: mamadoudicko Date: Tue, 24 Oct 2023 14:45:20 +0200 Subject: [PATCH 2/2] feat: remove unnecessary migration --- scripts/new.sql | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 scripts/new.sql diff --git a/scripts/new.sql b/scripts/new.sql deleted file mode 100644 index ae3d22a92c6b..000000000000 --- a/scripts/new.sql +++ /dev/null @@ -1,27 +0,0 @@ -DO $$ -BEGIN - -- Check if the column max_requests_number exists - IF EXISTS ( - SELECT 1 - FROM information_schema.columns - WHERE table_name='user_settings' AND column_name='max_requests_number' - ) THEN - -- Rename the column - ALTER TABLE user_settings RENAME COLUMN max_requests_number TO daily_chat_credit; - END IF; - - -- Modify default values - ALTER TABLE user_settings ALTER COLUMN daily_chat_credit SET DEFAULT 20; - ALTER TABLE user_settings ALTER COLUMN max_brains SET DEFAULT 3; -END $$; - --- Update migrations table -INSERT INTO migrations (name) -SELECT '202309307004032_change_user_settings' -WHERE NOT EXISTS ( - SELECT 1 FROM migrations WHERE name = '202309307004032_change_user_settings' -); - -COMMIT; - -