From 56d06d0889c9cdb1333ef44462838a8cfe8fe55e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Wed, 25 Apr 2018 10:59:07 +0200 Subject: [PATCH] Honor #337 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 682d40574b..671caafb4f 100644 --- a/README.md +++ b/README.md @@ -163,7 +163,7 @@ struct Place { try dbQueue.write { db in // Create database table try db.create(table: "places") { t in - t.column("id", .integer).primaryKey() + t.autoIncrementedPrimaryKey("id") t.column("title", .text).notNull() t.column("favorite", .boolean).notNull().defaults(to: false) t.column("longitude", .double).notNull() @@ -4320,7 +4320,7 @@ Yet any kind of schema change is still possible. The SQLite documentation explai // Add a NOT NULL constraint on players.name: migrator.registerMigrationWithDeferredForeignKeyCheck("AddNotNullCheckOnName") { db in try db.create(table: "new_players") { t in - t.column("id", .integer).primaryKey() + t.autoIncrementedPrimaryKey("id") t.column("name", .text).notNull() } try db.execute("INSERT INTO new_players SELECT * FROM players")