All Versions
267
Latest Version
Avg Release Cycle
15 days
Latest Release
-

Changelog History
Page 7

  • v4.12.2 Changes

    April 13, 2020

    ๐Ÿš€ Released April 13, 2020 • diff

    ๐Ÿ›  Fixed

    • #757: Don't load association inflections unless necessary
  • v4.12.1 Changes

    March 29, 2020

    ๐Ÿš€ Released March 29, 2020 • diff

    ๐Ÿ›  Fixed

    • #744: Fix DatabaseMigrator deadlock with serial target queues
  • 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

    ๐Ÿš€ Released February 23, 2020 • diff

    ๐Ÿ†• New

    • ๐Ÿ‘ #689 by @gjeck: Add support for renaming columns within a table
    • โœจ #690: Enhance SQLLiteral and SQL interpolation
  • v4.9.0 Changes

    January 17, 2020

    ๐Ÿš€ Released January 17, 2020 • diff

    ๐Ÿ†• New

    • #683: String concatenation
    • 0๏ธโƒฃ #685 by @gjeck: Add cache for TableRecord.defaultDatabaseTableName
  • v4.8.1 Changes

    January 12, 2020

    ๐Ÿš€ Released January 12, 2020 • diff

    ๐Ÿ›  Fixed

    • #677: Fix associations altered by another association
  • v4.8.0 Changes

    January 08, 2020

    ๐Ÿš€ Released January 8, 2020 • diff

    ๐Ÿ†• New

    • โšก๏ธ #676: More batch delete and update
  • 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