Sha256: 3f519e59cec07c8741505bdf366102f34d3476e4fd4e2effe92e1e3ee2921a1b
Contents?: true
Size: 336 Bytes
Versions: 2
Compression:
Stored size: 336 Bytes
Contents
class AddConfigToSites < ActiveRecord::Migration def self.up add_column :sites, :config, :text Site.reset_column_information Site.find_in_batches do |sites| sites.each do |site| site.title = site.hostname site.save end end end def self.down remove_column :sites, :config end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
radiant-vhost-extension-2.3.1 | db/migrate/20100716175246_add_config_to_sites.rb |
radiant-vhost-extension-2.3.0 | db/migrate/20100716175246_add_config_to_sites.rb |