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
> Note about `bigint` type: `bigint` column type, used in SQL databases, doesn't fit into the regular `number` type and maps property to a `string` instead.
215
209
216
210
### `enum` column type
@@ -393,7 +387,6 @@ List of available options in `ColumnOptions`:
393
387
You can change it by specifying your own name.
394
388
395
389
-`length: number` - Column type's length. For example if you want to create `varchar(150)` type you specify column type and length options.
396
-
-`width: number` - column type's display width. Used only for [MySQL integer types](https://dev.mysql.com/doc/refman/5.7/en/integer-types.html)
397
390
-`onUpdate: string` - `ON UPDATE` trigger. Used only in [MySQL](https://dev.mysql.com/doc/refman/5.7/en/timestamp-initialization.html).
398
391
-`nullable: boolean` - Makes column `NULL` or `NOT NULL` in the database. By default column is `nullable: false`.
399
392
-`update: boolean` - Indicates if column value is updated by "save" operation. If false, you'll be able to write this value only when you first time insert the object. Default value is `true`.
@@ -406,7 +399,6 @@ List of available options in `ColumnOptions`:
406
399
-`precision: number` - The precision for a decimal (exact numeric) column (applies only for decimal column), which is the maximum
407
400
number of digits that are stored for the values. Used in some column types.
408
401
-`scale: number` - The scale for a decimal (exact numeric) column (applies only for decimal column), which represents the number of digits to the right of the decimal point and must not be greater than precision. Used in some column types.
409
-
-`zerofill: boolean` - Puts `ZEROFILL` attribute on to a numeric column. Used only in MySQL. If `true`, MySQL automatically adds the `UNSIGNED` attribute to this column.
410
402
-`unsigned: boolean` - Puts `UNSIGNED` attribute on to a numeric column. Used only in MySQL.
411
403
-`charset: string` - Defines a column character set. Not supported by all database types.
412
404
-`collation: string` - Defines a column collation.
Copy file name to clipboardExpand all lines: docs/docs/help/3-decorator-reference.md
+2-3Lines changed: 2 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -134,7 +134,7 @@ export class User {
134
134
You can change it by specifying your own name.
135
135
-`length: string|number` - Column type's length. For example, if you want to create `varchar(150)` type
136
136
you specify column type and length options.
137
-
-`width: number` - column type's display width. Used only for [MySQL integer types](https://dev.mysql.com/doc/refman/5.7/en/integer-types.html)
137
+
-`width: number` - column type's display width. Used only for [MySQL integer types](https://dev.mysql.com/doc/refman/5.7/en/integer-types.html). _Deprecated_ in newer MySQL versions, will be removed from TypeORM in an upcoming version.
138
138
-`onUpdate: string` - `ON UPDATE` trigger. Used only in [MySQL](https://dev.mysql.com/doc/refman/5.7/en/timestamp-initialization.html).
139
139
-`nullable: boolean` - determines whether the column can become `NULL` or always has to be `NOT NULL`. By default column is `nullable: false`.
140
140
-`update: boolean` - Indicates if column value is updated by "save" operation. If false, you'll be able to write this value only when you first time insert the object.
@@ -150,8 +150,7 @@ export class User {
150
150
-`scale: number` - The scale for a decimal (exact numeric) column (applies only for decimal column),
151
151
which represents the number of digits to the right of the decimal point and must not be greater than precision.
152
152
Used in some column types.
153
-
-`zerofill: boolean` - Puts `ZEROFILL` attribute on to a numeric column. Used only in MySQL.
154
-
If `true`, MySQL automatically adds the `UNSIGNED` attribute to this column.
153
+
-`zerofill: boolean` - Puts `ZEROFILL` attribute on to a numeric column. Used only in MySQL. If `true`, MySQL automatically adds the `UNSIGNED` attribute to this column. _Deprecated_ in newer MySQL versions, will be removed from TypeORM in an upcoming version. Use a character column and the `LPAD` function as suggested by MySQL.
155
154
-`unsigned: boolean` - Puts `UNSIGNED` attribute on to a numeric column. Used only in MySQL.
156
155
-`charset: string` - Defines a column character set. Not supported by all database types.
157
156
-`collation: string` - Defines a column collation.
0 commit comments