浙江省高等学校教师教育理论培训

微信搜索“毛凌志岗前心得”小程序

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

change_column_default(table_name, column_name, default)

Sets a new default value for a column. If you want to set the default value to NULL, you are out of luck. You need to DatabaseStatements#execute the appropriate SQL statement yourself.

Examples
 change_column_default(:suppliers, :qualification, 'new')
 change_column_default(:accounts, :authorized, 1)

posted on 2011-02-02 09:47  lexus  阅读(529)  评论(0)    收藏  举报