Tags
webcam vindaloo vim version vegan unix unicef trojan todo tmux thinkpad textmate testing tagging syntax svn sugar subversion stubbing sphinx spam spaces solaris sitemap site sinatra shoulda sheet set security search schema_info SchemaInfo ruby rinari restaurant relationships refresh rdiff-backup ramaze railsconf08 railsconf07 rails protools production power placeboeffect pink floyd PIC perl overheat outbreak osx os x NYHS NYC nginx netbeans nested nanophotonics mysql music MPEG-4 mongrel model migration microvolunteer macbook mac logrotate logic log linux less leopard keynote JAX javascript java jacksonville iterm2 iterm imunizator highlighting hanna Handbrake haml hacks google geocoding genghistron gem gaming gabrielle's funny functional fun friends food fixesThe Decider said over 5 years ago permalink Comment? (0)
Tagged: migration version schema_info SchemaInfo
Getting at schema_info or SchemaInfo
I’m writing a utility that will be executed using script/runner and needed to get at the table schema_info where the migration version is held. This worked:
class SchemaInfo < ActiveRecord::Base
set_table_name :schema_info
set_primary_key :version
attr_accessor :version
end
[1514][chadb@Jokerman:~/Sites/surveil/trunk]$ script/console Loading development environment. >> SchemaInfo.version => 149 >> quit