模式的顶部。RB声明:
# This file is auto-generated from the current state of the database. Instead of editing this file,
# please use the migrations feature of Active Record to incrementally modify your database, and
# then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your database schema. If you need
# to create the application database on another system, you should be using db:schema:load, not running
# all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
#
# It's strongly recommended to check this file into your version control system.
我必须赞同说什么上面关于不同用途的不同迁移[giorgian。我建议您清理面向开发的迁移以及您在分发发布时执行的其他任务。这对我,对于我自己和小团队来说都很有效。当然,我的主应用程序位于其他两个数据库之间,并有自己的模式,我必须小心谨慎,因此我们使用迁移(而不是模式还原)来进行新安装,并且需要在发布工程时使用这些迁移。
迈克,你使用注释? http://weblog.rubyonrails.org/2006/3/3/annotated-models它解决了大部分的原因想要做这个摆在首位 – 2009-09-30 01:24:48