mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-28 04:24:20 +00:00
Document that migrations run with deferred foreign key checks
This commit is contained in:
1 parent
bf89883ff5
commit
0d2ede4440
1 file changed
+2
@@ -4921,6 +4921,8 @@ migrator.registerMigration("v2") { db in
|
||||
|
||||
**Each migration runs in a separate transaction.** Should one throw an error, its transaction is rollbacked, subsequent migrations do not run, and the error is eventually thrown by `migrator.migrate(dbQueue)`.
|
||||
|
||||
**Migrations run with deferred foreign key checks,** starting SQLite 3.7.16+ (iOS 9.0+ / macOS 10.10+ / tvOS 9.0+ / watchOS 2.0+ / [custom SQLite build] / [SQLCipher](#encryption)). This means that eventual foreign key violations are only checked at the end of the migration (and they make the migration fail).
|
||||
|
||||
**The memory of applied migrations is stored in the database itself** (in a reserved table).
|
||||
|
||||
You migrate the database up to the latest version with the `migrate(_:)` method:
|
||||
|
||||
Reference in new issue
Block a user