diff --git a/README.md b/README.md index ed4f73a2d..fac41fd21 100644 --- a/README.md +++ b/README.md @@ -2215,11 +2215,11 @@ try migrator.migrate(dbQueue) // or migrator.migrate(dbPool) SQLite does not support many schema changes, and won't let you drop a table column with "ALTER TABLE ... DROP COLUMN ...", for example. -Yet any kind of schema change is still possible. The SQLite documentation explains in detail how to do so: https://www.sqlite.org/lang_altertable.html#otheralter. This technique requires the temporary disabling of foreign key checks, and is supported by the `withDisabledForeignKeyChecks` argument: +Yet any kind of schema change is still possible. The SQLite documentation explains in detail how to do so: https://www.sqlite.org/lang_altertable.html#otheralter. This technique requires the temporary disabling of foreign key checks, and is supported by the `registerMigrationWithDisabledForeignKeyChecks` function: ```swift // Add a NOT NULL constraint on persons.name: -migrator.registerMigration("AddNotNullCheckOnName", withDisabledForeignKeyChecks: true) { db in +migrator.registerMigrationWithDisabledForeignKeyChecks("AddNotNullCheckOnName") { db in try db.execute( "CREATE TABLE new_persons (id INTEGER PRIMARY KEY, name TEXT NOT NULL);" + "INSERT INTO new_persons SELECT * FROM persons;" +