Unique field option cannot be enabled if localization is disabled

Required System information

  • Node.js version: v20
  • NPM version: v10
  • Strapi version: 4.6.0
  • Database: SQLite 3
  • Operating system: Linux Mint 22.0
  • Is your project Javascript or Typescript: Javascript

Describe the bug

When adding a field if you do not want to enable localization (sync value across locales) but want unique enabled the content-type builder forces you to use localization with unique even though if you manually change the schema and test with data Strapi functions just fine with unique non-localized entries.

Steps to reproduce the behavior

  1. Create a content-type with i18n turned on
  2. Try to add a field
  3. Disable localization
  4. Try to enable unique
  5. See error

Expected behavior

To confirm with product team, but we should be able to have unique without localization as unique is applied at the document level not the entry level