Sha256: 4b3a58333648c10f19c79587aa42afa5b03b9ac2fb652a0a2da0f1a8cafc6c3f
Contents?: true
Size: 770 Bytes
Versions: 12
Compression:
Stored size: 770 Bytes
Contents
# This migration comes from tb_cms (originally 20120912121313) class ModifySiteIdForSpudPages < ActiveRecord::Migration def up change_column :spud_pages,:site_id,:integer,:default => 0,:null => false change_column :spud_templates,:site_id,:integer,:default => 0,:null => false change_column :spud_menus,:site_id,:integer,:default => 0,:null => false SpudPage.where(:site_id => nil).each {|f| f.site_id = 0 ; f.save} SpudMenu.where(:site_id => nil).each {|f| f.site_id = 0 ; f.save} end def down change_column :spud_pages,:site_id,:integer,:default => nil,:null => true change_column :spud_templates,:site_id,:integer,:default => nil,:null => true change_column :spud_menus,:site_id,:integer,:default => nil,:null => true end end
Version data entries
12 entries across 12 versions & 1 rubygems