mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-25 04:07:47 +00:00
Merge branch 'development' into GRDB5
# Conflicts: # CHANGELOG.md # README.md
This commit is contained in:
commit
eee2c65c14
7 files changed
+35
-10
No files matched your search
+10
-1
@@ -18,7 +18,7 @@ GRDB adheres to [Semantic Versioning](https://semver.org/), with one exception:
|
||||
|
||||
#### 4.x Releases
|
||||
|
||||
- `4.12.x` Releases - [4.12.0](#4120)
|
||||
- `4.12.x` Releases - [4.12.0](#4120) | [4.12.1](#4121)
|
||||
- `4.11.x` Releases - [4.11.0](#4110)
|
||||
- `4.10.x` Releases - [4.10.0](#4100)
|
||||
- `4.9.x` Releases - [4.9.0](#490)
|
||||
@@ -93,6 +93,15 @@ GRDB adheres to [Semantic Versioning](https://semver.org/), with one exception:
|
||||
- [#745](https://github.com/groue/GRDB.swift/pull/745): Explicit ValueObservation cancellation
|
||||
|
||||
|
||||
## 4.12.1
|
||||
|
||||
Released March 29, 2020 • [diff](https://github.com/groue/GRDB.swift/compare/v4.12.0...v4.12.1)
|
||||
|
||||
**Fixed**
|
||||
|
||||
- [#744](https://github.com/groue/GRDB.swift/pull/744): Fix DatabaseMigrator deadlock with serial target queues
|
||||
|
||||
|
||||
## 4.12.0
|
||||
|
||||
Released March 21, 2020 • [diff](https://github.com/groue/GRDB.swift/compare/v4.11.0...v4.12.0)
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'GRDB.swift'
|
||||
s.version = '4.12.0'
|
||||
s.version = '4.12.1'
|
||||
|
||||
s.license = { :type => 'MIT', :file => 'LICENSE' }
|
||||
s.summary = 'A toolkit for SQLite databases, with a focus on application development.'
|
||||
|
||||
@@ -138,7 +138,9 @@ public struct DatabaseMigrator {
|
||||
//
|
||||
// Create a temporary witness database (on disk, just in case
|
||||
// migrations would involve a lot of data).
|
||||
let witness = try DatabaseQueue(path: "", configuration: writer.configuration)
|
||||
var witnessConfiguration = writer.configuration
|
||||
witnessConfiguration.targetQueue = nil // Avoid deadlocks
|
||||
let witness = try DatabaseQueue(path: "", configuration: witnessConfiguration)
|
||||
|
||||
// Grab schema of migrated witness database
|
||||
let witnessSchema: SchemaInfo = try witness.writeWithoutTransaction { db in
|
||||
|
||||
@@ -406,12 +406,12 @@ ifdef JAZZY
|
||||
--author 'Gwendal Roué' \
|
||||
--author_url https://github.com/groue \
|
||||
--github_url https://github.com/groue/GRDB.swift \
|
||||
--github-file-prefix https://github.com/groue/GRDB.swift/tree/v4.12.0 \
|
||||
--module-version 4.12.0 \
|
||||
--github-file-prefix https://github.com/groue/GRDB.swift/tree/v4.12.1 \
|
||||
--module-version 4.12.1 \
|
||||
--module GRDB \
|
||||
--root-url http://groue.github.io/GRDB.swift/docs/4.12/ \
|
||||
--output Documentation/Reference \
|
||||
--podspec GRDB.swift.podspec
|
||||
--xcodebuild-arguments -project,GRDB.xcodeproj,-scheme,GRDBiOS
|
||||
else
|
||||
@echo Jazzy must be installed for doc
|
||||
@exit 1
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
| Swift version | GRDB version |
|
||||
| ------------- | ----------------------------------------------------------- |
|
||||
| **Swift 5.2** | [GRDB5 branch](https://github.com/groue/GRDB.swift/tree/GRDB5) |
|
||||
| Swift 5.1 | [v4.12.0](https://github.com/groue/GRDB.swift/tree/v4.12.0) |
|
||||
| Swift 5 | [v4.12.0](https://github.com/groue/GRDB.swift/tree/v4.12.0) |
|
||||
| Swift 4.2 | [v4.12.0](https://github.com/groue/GRDB.swift/tree/v4.12.0) |
|
||||
| Swift 5.1 | [v4.12.1](https://github.com/groue/GRDB.swift/tree/v4.12.0) |
|
||||
| Swift 5 | [v4.12.1](https://github.com/groue/GRDB.swift/tree/v4.12.0) |
|
||||
| Swift 4.2 | [v4.12.1](https://github.com/groue/GRDB.swift/tree/v4.12.0) |
|
||||
| Swift 4.1 | [v3.7.0](https://github.com/groue/GRDB.swift/tree/v3.7.0) |
|
||||
| Swift 4 | [v2.10.0](https://github.com/groue/GRDB.swift/tree/v2.10.0) |
|
||||
| Swift 3.2 | [v1.3.0](https://github.com/groue/GRDB.swift/tree/v1.3.0) |
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>4.12.0</string>
|
||||
<string>4.12.1</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
|
||||
@@ -348,6 +348,20 @@ class DatabaseMigratorTests : GRDBTestCase {
|
||||
try XCTAssertTrue(dbQueue.read(newMigrator.hasCompletedMigrations))
|
||||
}
|
||||
|
||||
// Regression test for https://github.com/groue/GRDB.swift/issues/741
|
||||
func testEraseDatabaseOnSchemaChangeDoesNotDeadLock() throws {
|
||||
dbConfiguration.targetQueue = DispatchQueue(label: "target")
|
||||
let dbQueue = try makeDatabaseQueue()
|
||||
|
||||
var migrator = DatabaseMigrator()
|
||||
migrator.eraseDatabaseOnSchemaChange = true
|
||||
migrator.registerMigration("1", migrate: { _ in })
|
||||
try migrator.migrate(dbQueue)
|
||||
|
||||
migrator.registerMigration("2", migrate: { _ in })
|
||||
try migrator.migrate(dbQueue)
|
||||
}
|
||||
|
||||
func testEraseDatabaseOnSchemaChange() throws {
|
||||
// 1st version of the migrator
|
||||
var migrator1 = DatabaseMigrator()
|
||||
|
||||
Reference in new issue
Block a user