@@ -1285,8 +1285,8 @@ defmodule Ecto.Migration do
1285
1285
>
1286
1286
> We have considered changing the column type even when it is not needed
1287
1287
> could lead to undesirable locks, that's why, at least in the PostgreSQL
1288
- > adapter, if you provide the option `:from`, and the type matches, we
1289
- > will avoid changing the type .
1288
+ > adapter, if you provide the option `:from`, and the column type matches,
1289
+ > we will skip updating it .
1290
1290
>
1291
1291
> Examples
1292
1292
>
@@ -1297,7 +1297,7 @@ defmodule Ecto.Migration do
1297
1297
>
1298
1298
> # adding a new foreign key constraint
1299
1299
> alter table("posts") do
1300
- > modify :author_id, references(:authors, type: :id), from: :id
1300
+ > modify :author_id, references(:authors, type: :id, validate: false ), from: :id
1301
1301
> end
1302
1302
>
1303
1303
> # Modify the :on_delete option of an existing foreign key
@@ -1306,12 +1306,10 @@ defmodule Ecto.Migration do
1306
1306
> from: references(:posts, on_delete: :nothing)
1307
1307
> end
1308
1308
>
1309
- >
1310
- > The previous syntax will offer two benefits, at least in the PostgreSQL adapter,
1311
- > the migration is reversible and if the column type remains the same, the column
1309
+ > The previous syntax will offer two benefits, apart from being a reversible migration,
1310
+ > at least in the PostgreSQL adapter, if the column type remains the same, the column
1312
1311
> type update will be skipped.
1313
1312
1314
-
1315
1313
## Examples
1316
1314
1317
1315
alter table("posts") do
0 commit comments