feat(cms): update content type (#1477)

This commit is contained in:
Mamadou DICKO 2023-10-24 14:49:13 +02:00 committed by GitHub
parent fbafbacc15
commit 0bf7d36629
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 29 deletions

View File

@ -30,7 +30,7 @@
"localized": true "localized": true
} }
}, },
"type": "string" "type": "text"
} }
} }
} }

View File

@ -823,7 +823,7 @@ export interface ApiSecurityQuestionSecurityQuestion
localized: true; localized: true;
}; };
}>; }>;
answer: Attribute.String & answer: Attribute.Text &
Attribute.SetPluginOptions<{ Attribute.SetPluginOptions<{
i18n: { i18n: {
localized: true; localized: true;

View File

@ -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;