Skip to content

Commit 95ce740

Browse files
authored
Update migration.ex
1 parent dce9553 commit 95ce740

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

lib/ecto/migration.ex

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,6 @@ defmodule Ecto.Migration do
141141
type by the various database adapters. For example, `:string` is
142142
converted to `:varchar`, `:binary` to `:bytea` or `:blob`, and so on.
143143
144-
Similarly, you can pass any field type supported by your database
145-
as long as it maps to an Ecto type. For instance, for an Ecto schema
146-
with the field `:string`, the database migration type can be any of
147-
`:text`, `:char` or `:varchar` (the default).
148-
149144
In particular, note that:
150145
151146
* the `:string` type in migrations by default has a limit of 255 characters.
@@ -157,10 +152,10 @@ defmodule Ecto.Migration do
157152
to impose a limit, pass the `:size` option accordingly. In MySQL, passing
158153
the size option changes the underlying field from "blob" to "varbinary"
159154
160-
Remember, atoms can contain arbitrary characters by enclosing in
161-
double quotes the characters following the colon. So, if you want to use a
162-
field type with database-specific options, you can pass atoms containing
163-
these options like `:"int unsigned"`, `:"time without time zone"`, etc.
155+
Any other type will be given as is to the database. For example, you
156+
can use `:text`, `:char`, or `:varchar` as types. Types that have spaces
157+
in their names can be wrapped in double quotes, such as `:"int unsigned"`,
158+
`:"time without time zone"`, etc.
164159
165160
## Executing and flushing
166161

0 commit comments

Comments
 (0)