Sha256: 139d5fabc5cd37452144621ce99918af72f7a9d1d17ce126f49b1219ea797809
Contents?: true
Size: 493 Bytes
Versions: 23
Compression:
Stored size: 493 Bytes
Contents
# This migration comes from tb_permalinks (originally 20120912123700) class ModifySiteIdForSpudPermalinks < ActiveRecord::Migration def up change_column :spud_permalinks, :site_id, :integer, :default => 0, :null => false SpudPermalink.where(:site_id => nil).each {|f| f.site_id = 0 ; f.save} end def down change_column :spud_permalinks, :site_id, :integer, :default => nil, :null => true SpudPermalink.where(:site_id => 0).each {|f| f.site_id = nil ; f.save} end end
Version data entries
23 entries across 23 versions & 2 rubygems