java.lang.ArrayIndexOutOfBoundsException: 100
2015-12-06 22:52
501 查看
http://www.activars.com/tags/migration
Posted by jay
Rails use a UTC time stamp as migration version by default. Although most examples in books have simple number based system for managing migration versions, there isn’t much information about version type configuration. By default, a migration file(>=Rail 2.0) name look similar to:
20081202130543_create_group_categories.rb
We can turn this off and use numeric prefixes by adding this in config/environment.rb
config.active_record.timestamped_migrations = false
New generated file name will look like:
003_create_group_categories.rb
But bare in mind, if the Rails project is getting large and a few developers are working on same project, it’s likely that two developers generate same version of migration (e.g. 003). Using time stamp is introduced since Rail 2.0 to avoid such problem. So… better keep the default setting!
Posted by jay
Rails use a UTC time stamp as migration version by default. Although most examples in books have simple number based system for managing migration versions, there isn’t much information about version type configuration. By default, a migration file(>=Rail 2.0) name look similar to:
20081202130543_create_group_categories.rb
We can turn this off and use numeric prefixes by adding this in config/environment.rb
config.active_record.timestamped_migrations = false
New generated file name will look like:
003_create_group_categories.rb
But bare in mind, if the Rails project is getting large and a few developers are working on same project, it’s likely that two developers generate same version of migration (e.g. 003). Using time stamp is introduced since Rail 2.0 to avoid such problem. So… better keep the default setting!
相关文章推荐
- java 抓取百度根据关键词搜索域名
- eclipse 中文乱码问题解决方案汇总
- 搭建Spring MVC环境进行简单的增、删、改、查。
- JAVA自学日记2--单例设计模式
- JAVA自学日记1-构造代码块,静态代码块,局部代码块总结
- java编程思想(读书笔记):7.多态
- eclipse 自定义eclipse快捷键
- Hadoop2.7.1 eclipse plugin Install
- myeclipse使用太卡问题
- 黑马35期最新JavaEE视频教程开始更新【全套不加密】
- java中怎么在table上显示数据
- Java checked Exception Nonchecked exception 总结
- java_4种阶乘算法
- [Java面向对象]封装
- eclipse 如何让eclipse启动更快
- eclipse常用调试
- SpringMVC_上传图片
- java 泛型问题 关于警告XXX is a raw type
- eclipse 界面定制,让eclipse看着更清爽
- Java 利用 ByteArrayOutputStream 和 ByteArrayInputStream 避免重复读取配置文件