Copypasta typically tastes a bit funny.

Signed-off-by: Stephen Celis <stephen@stephencelis.com>
This commit is contained in:
Stephen Celis 2015-04-27 08:51:06 -04:00
Родитель 8a85d80b0e
Коммит 213920b2f6
1 изменённых файлов: 6 добавлений и 4 удалений

Просмотреть файл

@ -965,11 +965,13 @@ The `alter` function shares several of the same [`column` function parameters](#
- `collate` adds a `COLLATE` clause to `Expression<String>` (and `Expression<String?>`) column definitions with [a collating sequence](https://www.sqlite.org/datatype3.html#collation) defined in the `Collation` enumeration.
``` swift
t.column(email, collate: .Nocase)
// email TEXT NOT NULL COLLATE "NOCASE"
t.alter(table: users, add: email, collate: .Nocase)
// ALTER TABLE "users"
// ADD COLUMN "email" TEXT NOT NULL COLLATE "NOCASE"
t.column(name, collate: .Rtrim)
// name TEXT COLLATE "RTRIM"
t.alter(table: users, add: name, collate: .Rtrim)
// ALTER TABLE "users"
// ADD COLUMN "name" TEXT COLLATE "RTRIM"
```
- `references` adds a `REFERENCES` clause to `Int64` (and `Int64?`) column definitions and accepts a table or namespaced column expression. (See the `foreignKey` function under [Table Constraints](#table-constraints) for non-integer foreign key support.)