From 1549affd5c5d901ddc8f569d12773fef54d168fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Sun, 7 Aug 2016 04:14:29 +0200 Subject: [PATCH] Documentation --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ef2860e1d..e873aac11 100644 --- a/README.md +++ b/README.md @@ -59,8 +59,8 @@ try dbQueue.inDatabase { db in try db.execute( "CREATE TABLE pointOfInterests (" + "id INTEGER PRIMARY KEY, " + - "title TEXT, " + - "favorite BOOLEAN NOT NULL, " + + "title TEXT NOT NULL, " + + "favorite BOOLEAN NOT NULL DEFAULT 0, " + "latitude DOUBLE NOT NULL, " + "longitude DOUBLE NOT NULL" + ")") @@ -133,8 +133,8 @@ Avoid SQL with the [query interface](#the-query-interface): dbQueue.inDatabase { db in try db.create(table: "pointOfInterests") { t in t.column("id", .Integer).primaryKey() - t.column("title", .Text) - t.column("favorite", .Boolean).notNull() + t.column("title", .Text).notNull() + t.column("favorite", .Boolean).notNull().defaults(false) t.column("longitude", .Double).notNull() t.column("latitude", .Double).notNull() }