You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Documentation/Index.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -965,11 +965,13 @@ The `alter` function shares several of the same [`column` function parameters](#
965
965
- `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.
// ADD COLUMN "email" TEXT NOT NULL COLLATE "NOCASE"
970
971
971
-
t.column(name, collate: .Rtrim)
972
-
// name TEXT COLLATE "RTRIM"
972
+
t.alter(table: users, add: name, collate: .Rtrim)
973
+
// ALTER TABLE "users"
974
+
// ADD COLUMN "name" TEXT COLLATE "RTRIM"
973
975
```
974
976
975
977
- `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.)
0 commit comments