Hi!
I would like to propose a new feature to enhance support for PostgreSQL database creation by allowing users to specify LOCALE_PROVIDER and ICU_LOCALE options when running `mix ecto.create`. This would be particularly useful for users working with ICU-based collations, as ICU provides more advanced and consistent collation rules across platforms compared to the default libc provider.
These options would integrate seamlessly with the existing database configuration in config/dev.exs or other environment-specific files.
```
config :my_app, MyApp.Repo,
database: "my_database",
username: "postgres",
password: "postgres",
hostname: "localhost",
locale_provider: "icu",
icu_locale: "es-ES",
template: "template0"
```
If implemented, the command: `mix ecto.create` would translate into:
```
CREATE DATABASE my_database
WITH LOCALE_PROVIDER 'icu' ICU_LOCALE 'es-ES' TEMPLATE 'template0';
```
And the resulting database should be:
```
# \l my_database;
Name | my_database
Owner | postgres
Encoding | UTF8
Locale Provider | icu
Collate | en_US.UTF-8
Ctype | en_US.UTF-8
Locale | es-ES
ICU Rules |
Access privileges |
```
Please let me know if you need additional details or would like assistance in contributing this functionality.
Thank you!
--
You received this message because you are subscribed to the Google Groups "elixir-ecto" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-ecto...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/elixir-ecto/6b210001-e864-4008-ab12-e442416d87een%40googlegroups.com.