教义2 +无符号值 [英] Doctrine 2 + unsigned value
问题描述
是否可以在Doctrine 2中指定无符号整数
的列类型?
Is it possible to specify a column type of unsigned integer
in Doctrine 2?
推荐答案
你可以,但你会松动可移植性。使用 columnDefinition
属性并将其设置为 integer unsigned
。实际代码取决于您正在使用的内容。
You can but you will loose portability. Use columnDefinition
attribute and set it to integer unsigned
. The actual code depends on what you are using.
columnDefinition:DDL从列名称
开始的SQL代码段,并指定完整(非便携!)列定义。这个
属性允许使用高级RMDBS功能。但是,
应该仔细使用这个功能和后果。
如果
您使用columnDefinition,SchemaTool将无法正确检测列的更改。
columnDefinition: DDL SQL snippet that starts after the column name and specifies the complete (non-portable!) column definition. This attribute allows to make use of advanced RMDBS features. However you should make careful use of this feature and the consequences. SchemaTool will not detect changes on the column correctly anymore if you use "columnDefinition".
这篇关于教义2 +无符号值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!