GRDB.swift v4.12.1 Release Notes

Release Date: 2020-03-29 // 10 days ago
  • 🚀 Released March 29, 2020 • diff

    🛠 Fixed

    • #744: Fix DatabaseMigrator deadlock with serial target queues

Previous changes from v4.12.0

  • 🚀 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)