fluent
fluent copied to clipboard
COLLATION support in Fluent
Are there any plans to support COLLATION in Fluent or Postgres-kit/MySQL-kit https://www.postgresql.org/docs/current/collation.html
I am trying to create a COLLATION during schema creation in the Migration script . Is there a way for me to do it ? I read about .custom but unable to make it work.
DB Fiddle: https://dbfiddle.uk/?rdbms=postgres_12&fiddle=e7945853a6501b4eb1ceea94da3e0b46 Schema:
create table versions (v1 varchar(20));
CREATE COLLATION en_natural (
LOCALE = 'en-US-u-kn-true',
PROVIDER = 'icu'
);
insert into versions values
('1.2'),
('1.23.231+b'),
('1.23.231+a'),
('1.23'),
('1.23.231-test.beta'),
('1.23.231-test.alpha'),
('1.23.45-rc.2+B001');
Query:
SELECT *
FROM versions ORDER BY v1 COLLATE en_natural desc;
Any examples would be helpful or some workaround to get it working.
It's been discussed a few times, with the main issue that Fluent needs to generally support all the databases. A future version may potentially support it.
A raw migration is probably the best workaround