Skip to content

Commit a83b901

Browse files
committed
make clear that specifically ALTER TABLE ADD CONSTRAINT is something SQLite3 does not support
1 parent 3899f52 commit a83b901

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/ecto/adapters/sqlite3.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ defmodule Ecto.Adapters.SQLite3 do
117117
the SQLite3 [CREATE TABLE documentation](https://sqlite.org/lang_createtable.html).
118118
119119
Because of this, you cannot add a constraint via the normal `Ecto.Migration.constraint/3` method, as that
120-
operates via ALTER TABLE which SQLite3 does not support. You can however get the full functionality by adding
121-
a constraint at the column level, specifying the name and expression. Per the SQLite3 documentation,
122-
there is no _functional_ difference between a column or table constraint.
120+
operates via ALTER TABLE ADD CONSTRAINT, and this type of ALTER TABLE operation SQLite3 does not support.
121+
You can however get the full functionality by adding a constraint at the column level, specifying the name
122+
and expression. Per the SQLite3 documentation, there is no _functional_ difference between a column or table constraint.
123123
124124
Thus, adding a check constraint for a new column is as simple as:
125125

0 commit comments

Comments
 (0)