Skip to content

Commit

Permalink
Honor #337
Browse files Browse the repository at this point in the history
  • Loading branch information
groue committed Apr 25, 2018
1 parent 727491c commit 56d06d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit 56d06d0

Please sign in to comment.