开发者

liquibase defaultValue vs defaultValueNumeric

Can anyone tell me the difference between specifying a defaultValue="0" vs a defaultValueNumeric="0" in a changeset开发者_开发问答? It's for a bigint column.

http://www.liquibase.org/manual/add_default_value doesn't really go into detail here.


The difference is that defaultValue puts quotes around the value in the resulting SQL. Many database will interpret inserting '42' into a numeric field as the number 42, but some fail. defaultValueNumeric tells liquibase it is a number and therefore will not be quoted and will work on all database types.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜