In some Rails model definitions, there is a comment block at the top that contains the schema information.
# == Schema Information # Schema version: 20090122060318 # # Table name: table_name # # id :integer(4) not null, primary key ...
When does this get updated? Is it only generated once, when you use the generator script to create the model? Is there a way to update this block when migrations are performed?
Seems like output of the annotate_models plugin. Just install it and run
annotatein your rails root and the schema information will update automatically. Ideally, run it after each migration.