Sha256: 1d995f5c43be40bb74203848b35413eb72745878107ef05ee6d0497df8b172bc

Contents?: true

Size: 540 Bytes

Versions: 230

Compression:

Stored size: 540 Bytes

Contents

class AddGrainSizeToEntries < ActiveRecord::Migration
  def self.up
    add_column :feeds, :default_grain_size, :string, :default => "unknown"
    execute "UPDATE feeds SET default_grain_size = 'course' WHERE ocw = true" 
    remove_column :feeds, :ocw

    add_column :entries, :grain_size, :string, :default => "unknown"
    add_index "entries", ["grain_size"]
  end

  def self.down
    remove_column :feeds, :default_grain_size
    remove_column :entries, :grain_size
    add_column :fields, :ocw, :boolean, :default => false
  end
end

Version data entries

230 entries across 122 versions & 4 rubygems

Version Path
muck-raker-0.3.18 db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-raker-0.3.18 test/rails_root/db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-raker-0.3.17 test/rails_root/db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-raker-0.3.17 db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-services-0.1.46 db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-services-0.1.46 test/rails_root/db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-raker-0.3.16 db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-raker-0.3.16 test/rails_root/db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-services-0.1.45 test/rails_root/db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-services-0.1.45 db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-raker-0.3.15 test/rails_root/db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-raker-0.3.15 db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-raker-0.3.14 db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-raker-0.3.14 test/rails_root/db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-services-0.1.44 db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-services-0.1.44 test/rails_root/db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-services-0.1.43 db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-services-0.1.43 test/rails_root/db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-services-0.1.42 test/rails_root/db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-services-0.1.42 db/migrate/20090623181458_add_grain_size_to_entries.rb