From 800b9ffc3de74e84b56bcdb799174091336b33d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Wed, 3 Jun 2020 20:09:22 +0200 Subject: [PATCH] Name the temporary database used by DatabaseMigrator.eraseDatabaseOnSchemaChange --- GRDB/Migration/DatabaseMigrator.swift | 1 + TODO.md | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/GRDB/Migration/DatabaseMigrator.swift b/GRDB/Migration/DatabaseMigrator.swift index 875219d28..a2b80a3db 100644 --- a/GRDB/Migration/DatabaseMigrator.swift +++ b/GRDB/Migration/DatabaseMigrator.swift @@ -140,6 +140,7 @@ public struct DatabaseMigrator { // migrations would involve a lot of data). var witnessConfiguration = writer.configuration witnessConfiguration.targetQueue = nil // Avoid deadlocks + witnessConfiguration.label = "GRDB.DatabaseMigrator.temporary" let witness = try DatabaseQueue(path: "", configuration: witnessConfiguration) // Grab schema of migrated witness database diff --git a/TODO.md b/TODO.md index 89cd56b49..7e66d6911 100644 --- a/TODO.md +++ b/TODO.md @@ -16,8 +16,6 @@ ## Features -- [ ] Access the database label -- [ ] Label the Migrator witness dbQueue - [ ] Subqueries: request.isEmpty / request.exists - [ ] Subqueries: request.count - [ ] Extract one row from a hasMany association (the one with the maximum date, the one with a flag set, etc.) https://stackoverflow.com/questions/43188771/sqlite-join-query-most-recent-posts-by-each-user (failed PR: https://github.com/groue/GRDB.swift/pull/767)