Sha256: 8013c38d1fadb042a2a0d2359286944d6c2a41655701270e7799af7ba067aa83

Contents?: true

Size: 485 Bytes

Versions: 2

Compression:

Stored size: 485 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

2 entries across 2 versions & 1 rubygems

Version Path
tb_cms-1.3.0 spec/dummy/db/migrate/20141231214457_modify_site_id_for_spud_permalinks.tb_permalinks.rb
tb_cms-1.3.beta1 spec/dummy/db/migrate/20141231214457_modify_site_id_for_spud_permalinks.tb_permalinks.rb