From 1e1f53a8fc381e78fc92c521bbbf4730f67bbb61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Thu, 5 Nov 2015 09:06:33 +0100 Subject: [PATCH] README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 69c61905f..72b4aa27b 100644 --- a/README.md +++ b/README.md @@ -1185,6 +1185,7 @@ SQLite does not support many schema changes, and won't let you drop a table colu 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 a specific method of DatabaseMigrator: ```swift +// Add a NOT NULL constraint on persons.name: migrator.registerMigrationWithoutForeignKeyChecks("AddNotNullCheckOnName") { db in try db.executeMultiStatement( "CREATE TABLE new_persons (id INTEGER PRIMARY KEY, name TEXT NOT NULL);" +