Skip to content

Commit fb1655e

Browse files
milmazznovaugustjosevalim
authored
Apply suggestions from code review
Co-authored-by: Matt Enlow <[email protected]> Co-authored-by: José Valim <[email protected]>
1 parent 6b90290 commit fb1655e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/ecto/migration.ex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1276,7 +1276,7 @@ defmodule Ecto.Migration do
12761276
> #### Modifying a column without changing its type {: .warning}
12771277
>
12781278
> If you want to modify a column without changing its type,
1279-
> such as adding or dropping a null constraints, consider using
1279+
> such as adding or dropping a null constraint, consider using
12801280
> the `execute/2` command with the relevant SQL command instead
12811281
> of `modify/3`, if supported by your database. This may avoid
12821282
> redundant type updates and be more efficient, as an unnecessary
@@ -1288,7 +1288,7 @@ defmodule Ecto.Migration do
12881288
> adapter, if you provide the option `:from`, and the column type matches,
12891289
> we will skip updating it.
12901290
>
1291-
> Examples
1291+
> Examples:
12921292
>
12931293
> # modify column with rollback options
12941294
> alter table("posts") do
@@ -1306,9 +1306,9 @@ defmodule Ecto.Migration do
13061306
> from: references(:posts, on_delete: :nothing)
13071307
> end
13081308
>
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
1311-
> type update will be skipped.
1309+
> The previous syntax offers two benefits:
1310+
> 1. the migrations are reversible
1311+
> 2. the PostgreSQL adapter will skip the type update, due to the `:from` type matching the modify type
13121312
13131313
## Examples
13141314

0 commit comments

Comments
 (0)