Commit Graph
31 Commits
Author SHA1 Message Date
Gwendal Roué 8e2fb1fb22 Update tests 2020-09-06 13:57:16 +02:00
Gwendal Roué ed6ad9d373 Clean up DatabaseMigrator tests 2020-05-11 08:50:04 +02:00
Gwendal Roué 44772f89d7 More tests for DatabaseMigrator.hasBeenSuperseded(_:) 2020-05-11 08:46:41 +02:00
Gwendal Roué 2aa61c3403 Tests for DatabaseMigrator.hasBeenSuperseded(_:) 2020-05-11 08:28:02 +02:00
Gwendal Roué d60fe3c22f Replace import GRDBCustomSQLite with import GRDB 2020-04-04 16:44:01 +02:00
Gwendal Roué eee2c65c14 Merge branch 'development' into GRDB5
# Conflicts:
#	CHANGELOG.md
#	README.md
2020-03-29 18:55:06 +02:00
Gwendal Roué 70c6f3ec44 Failing test for #741 2020-03-29 12:09:24 +02:00
Gwendal Roué dab8e28f6d Merge branch 'master' into GRDB5
# Conflicts:
#	GRDB/Migration/DatabaseMigrator.swift
#	GRDB/QueryInterface/Request/QueryInterfaceRequest.swift
#	README.md
2020-03-21 14:35:57 +01:00
Gwendal Roué c1d1797576 Address #725 2020-03-18 20:36:56 +01:00
Gwendal Roué 00b0dc2a04 Remove availability checks for macOS 10.10 (forgotten in #719) 2020-03-08 19:08:15 +01:00
Gwendal Roué b9d4a5215a Remove deprecated DatabaseMigrator methods 2020-03-08 17:13:31 +01:00
Gwendal Roué e9dd8b2b09 Enhance DatabaseMigrator querying methods
// 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)
2020-03-07 13:59:46 +01:00
Gwendal Roué 7af846c87f Rename new DatabaseMigrator methods 2020-02-29 15:07:36 +01:00
Gwendal Roué d35d6fc2f8 Rename isMigrated(in:upTo:) to isMigrated(in:beyond:), introduce lastAppliedMigration(in:) 2020-02-28 14:27:52 +01:00
Gwendal Roué 91a3557281 Rename hasUnappliedMigrations to isMigrated 2020-02-28 07:40:19 +01:00
Gwendal Roué 92e8ef9b87 More DatabaseMigrator tests 2020-02-27 21:01:56 +01:00
Gwendal Roué 692af926be Tests for DatabaseMigrator.hasUnappliedMigrations 2020-02-27 20:51:44 +01:00
Gwendal Roué 4f9878a1da Update tests for the deprecated registerMigrationWithDeferredForeignKeyCheck method 2020-02-26 13:57:49 +01:00
Michael Kirk 9ea160b116 Fix: appliedMigrations throws error on new install
Before setup, the grdb_migrations table doesn't exist, so calling
`appliedMigrations` would throw an error.

To avoid this, if the table to track migrations doesn't exist yet, we can be
sure no migrations have been run, and we retun the empty set.

FIXES https://github.com/groue/GRDB.swift/issues/652
2019-11-18 09:09:46 -07:00
Gwendal Roué 6b83ba3585 Failing test for eraseDatabaseOnSchemaChange 2019-09-17 08:18:45 +02:00
Gwendal Roué 1c1ee4e92a GRDBCipher is no longer. Long live GRDB.swift/SQLCipher. 2019-04-19 13:11:55 +02:00
Gwendal Roué db67d3840b Principle of least astonishment: rrename argument label rawSQL to sql 2019-02-17 13:28:41 +01:00
Gwendal Roué c546c578ce fetchCursor/All/One(_:rawSQL:arguments:adapter:) 2019-02-17 13:28:40 +01:00
Gwendal Roué 59162d93de Rename Database.execute(_:String) to Database.execute(rawSQL:String) 2019-02-17 13:27:54 +01:00
Gwendal Roué fee4486d1b DatabaseMigrator.eraseDatabaseOnSchemaChange 2018-07-07 14:23:50 +02:00
Gwendal Roué c61949ceaf DatabaseError.description contains primary result code, not extended result code. 2017-09-11 08:12:43 +02:00
Gwendal Roué 823b094b60 SE-0168 2017-08-18 14:22:14 +02:00
Gwendal Roué 06a6c982aa SE-0148 2017-08-18 14:22:14 +02:00
Gwendal Roué 0c192fcb57 DatabaseMigrator.migrate(_:upTo:) 2017-06-20 07:54:19 +02:00
Gwendal Roué 55e4abd534 Rename USING_SQLCIPHER to GRDBCIPHER and USING_CUSTOMSQLITE to GRDBCUSTOMSQLITE 2017-05-22 19:15:10 +02:00
Gwendal Roué e54cec9123 Move tests to Swift Package Manager test target 2017-04-23 15:47:16 +02:00