From 936d2e56ea10cbc8c973c51ffd2d74f798ae509c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Wed, 10 Aug 2016 09:08:06 +0200 Subject: [PATCH] CHANGELOG.md --- CHANGELOG.md | 13 +++++++++++++ TODO.md | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eec65bc98..c73f4459a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,19 @@ Release Notes ## Next Version +**Fixed** + +- `ColumnDefinition.check()` can now define several constraints: + + ```swift + try db.create(table: "users") { t in + t.column("name", .Text).notNull() + .check { length($0) > 0 } + .check { !["root", "admin"].contains($0) } + } + ``` + + **New** - Persistable `update`, `exists` and `delete` methods now work with objects that have a nil primary key. They used to crash. diff --git a/TODO.md b/TODO.md index 87e44a73c..bc803908e 100644 --- a/TODO.md +++ b/TODO.md @@ -2,7 +2,7 @@ - [ ] @hdlj: FetchedRecordsController throttling - [ ] @hdlj: Check RAM pressure - [ ] Table builder: allow several foreign keys on a columns -- [ ] Table builder: allow checks on a columns +- [X] Table builder: allow checks on a columns - [X] Record.exists(db) should return false when primary key is nil - [X] Record.update(db) should throw, not crash, when primary key is nil - [ ] Fatal Error when MutablePersistable.update(_:columns:) is given columns that do not exist in the database.