Changelog History
Page 7
-
v4.12.2 Changes
April 13, 2020 -
v4.12.1 Changes
March 29, 2020 -
v4.12.0 Changes
March 21, 2020๐ Released March 21, 2020 • diff
๐ New
โก๏ธ Batch updates now accept nil assignments:
// UPDATE player SET score = NULL try Player.updateAll(db, scoreColumn <- nil)
๐ DatabaseMigrator can now recreate the database if a migration has been removed, or renamed (addresses #725).
DatabaseMigrator querying methods have been enhanced:
// New dbQueue.read(migrator.hasCompletedMigrations) dbQueue.read(migrator.completedMigrations).contains("v2") dbQueue.read(migrator.completedMigrations).last == "v2" dbQueue.read(migrator.appliedMigrations) // Deprecated migrator.hasCompletedMigrations(in: dbQueue) migrator.hasCompletedMigrations(in: dbQueue, through: "v2") migrator.lastCompletedMigration(in: dbQueue) == "v2" migrator.appliedMigrations(in: dbQueue)
-
v4.11.0 Changes
March 02, 2020๐ Released March 2, 2020 • diff
๐ New
- โจ #706: Enhance SQLLiteral and SQL interpolation again
- #710: Check if all migrations have been applied
- #712 by @pakko972: Automatic iOS memory management
- โจ #713: Enhance DatabaseMigrator isolation
๐ฅ Breaking Change
- #709: Simplify DatabaseMigrator API
Database migrations have a new behavior which is a breaking change. However, it is very unlikely to impact your application.
In previous versions of GRDB, a foreign key violation would immediately prevent a migration from successfully complete. Now, foreign key checks are deferred until the end of each migration. This means that some migrations will change their behavior:
// Used to fail, now succeeds migrator.registerMigration(...) { db in try violateForeignKeyConstraint(db) try fixForeignKeyConstraint(db) } // The catch clause is no longer called migrator.registerMigration(...) { db in do { try performChanges(db) } catch let error as DatabaseError where error.resultCode == .SQL_CONSTRAINT { // Handle foreign key error } }
โช If your application happens to define migrations that are impacted by this change, please open an issue so that we find a way to restore the previous behavior.
-
v4.10.0 Changes
February 23, 2020 -
v4.9.0 Changes
January 17, 2020 -
v4.8.1 Changes
January 12, 2020 -
v4.8.0 Changes
January 08, 2020 -
v4.7.0 Changes
December 18, 2019๐ Released December 18, 2019 • diff
๐ New
- #656: Type inference of selected columns
- #659: Database interruption
- ๐ #660: Database Lock Prevention
- โฌ๏ธ #662: Upgrade custom SQLite builds to version 3.30.1 (thanks to @swiftlyfalling)
- #668: Database Suspension
๐ฅ Breaking Changes
๐ [Custom SQLite builds](Documentation/CustomSQLiteBuilds.md) now disable by default the support for the Double-quoted String Literals misfeature. This is a technically a breaking change, but it fixes an SQLite bug. You can restore the previous behavior if your application relies on it:
// Enable support for the Double-quoted String Literals misfeature var configuration = Configuration() configuration.acceptsDoubleQuotedStringLiterals = true let dbQueue = try DatabaseQueue(path: ..., configuration: configuration)
๐ Documentation Diff
The new [Interrupt a Database](README.md#interrupt-a-database) chapter documents the new
interrupt()
method.๐ The new [Sharing a Datatase in an App Group Container](Documentation/AppGroupContainers.md) guide explains how to setup GRDB when you share a database in an iOS App Group container.
API Diff
struct Configuration { + var observesSuspensionNotifications: Bool // Experimental + var acceptsDoubleQuotedStringLiterals: Bool } class Database { + static let suspendNotification: Notification.Name // Experimental + static let resumeNotification: Notification.Name // Experimental } extension DatabaseError { + var isInterruptionError: Bool { get } } protocol DatabaseReader { + func interrupt() } extension SQLSpecificExpressible { + #if GRDBCUSTOMSQLITE + var ascNullsLast: SQLOrderingTerm { get } + var descNullsFirst: SQLOrderingTerm { get } + #endif }
-
v4.6.2 Changes
November 20, 2019๐ Released November 20, 2019 • diff
๐ Fixed
- ๐ฆ #653 by @michaelkirk-signal: Fix DatabaseMigrator.appliedMigrations() error on empty database