mirror of
https://github.com/metabolist/metatext.git
synced 2024-11-25 09:41:00 +00:00
Specify collation in schema
This commit is contained in:
parent
7ce055ac1d
commit
2c9a69f8f6
1 changed files with 2 additions and 2 deletions
|
@ -232,7 +232,7 @@ public extension ContentDatabase {
|
||||||
|
|
||||||
func listsObservation() -> AnyPublisher<[Timeline], Error> {
|
func listsObservation() -> AnyPublisher<[Timeline], Error> {
|
||||||
ValueObservation.tracking(Timeline.filter(Column("listTitle") != nil)
|
ValueObservation.tracking(Timeline.filter(Column("listTitle") != nil)
|
||||||
.order(Column("listTitle").collating(.localizedCaseInsensitiveCompare).asc)
|
.order(Column("listTitle").asc)
|
||||||
.fetchAll)
|
.fetchAll)
|
||||||
.removeDuplicates()
|
.removeDuplicates()
|
||||||
.publisher(in: databaseWriter)
|
.publisher(in: databaseWriter)
|
||||||
|
@ -340,7 +340,7 @@ private extension ContentDatabase {
|
||||||
|
|
||||||
try db.create(table: "timeline") { t in
|
try db.create(table: "timeline") { t in
|
||||||
t.column("id", .text).indexed().notNull().primaryKey(onConflict: .replace)
|
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
|
try db.create(table: "timelineStatusJoin") { t in
|
||||||
|
|
Loading…
Reference in a new issue