From 2c9a69f8f6a7784e2732e84905c7f7c4dfbaaeb0 Mon Sep 17 00:00:00 2001 From: Justin Mazzocchi <2831158+jzzocc@users.noreply.github.com> Date: Sun, 27 Sep 2020 22:29:24 -0700 Subject: [PATCH] Specify collation in schema --- DB/Sources/DB/Content/ContentDatabase.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DB/Sources/DB/Content/ContentDatabase.swift b/DB/Sources/DB/Content/ContentDatabase.swift index 261c065..c48defa 100644 --- a/DB/Sources/DB/Content/ContentDatabase.swift +++ b/DB/Sources/DB/Content/ContentDatabase.swift @@ -232,7 +232,7 @@ public extension ContentDatabase { func listsObservation() -> AnyPublisher<[Timeline], Error> { ValueObservation.tracking(Timeline.filter(Column("listTitle") != nil) - .order(Column("listTitle").collating(.localizedCaseInsensitiveCompare).asc) + .order(Column("listTitle").asc) .fetchAll) .removeDuplicates() .publisher(in: databaseWriter) @@ -340,7 +340,7 @@ private extension ContentDatabase { try db.create(table: "timeline") { t in t.column("id", .text).indexed().notNull().primaryKey(onConflict: .replace) - t.column("listTitle", .text).indexed() + t.column("listTitle", .text).indexed().collate(.localizedCaseInsensitiveCompare) } try db.create(table: "timelineStatusJoin") { t in