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-services-3.3.3 test/db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-services-3.3.3 db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-auth-3.5.4 test/db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-auth-3.5.3 test/db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-auth-3.5.2 test/db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-services-3.3.2 db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-services-3.3.1 db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-services-3.3.0 db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-services-3.2.2 db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-services-3.2.1 db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-services-3.2.0 db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-services-3.1.1 db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-services-3.1.0 db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-raker-3.1.0 db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-services-0.1.47 db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-services-0.1.47 test/rails_root/db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-services-3.0.0 db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-services-3.0.0 test/rails_test/db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-raker-3.0.0 test/rails_test/db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-raker-3.0.0 db/migrate/20090623181458_add_grain_size_to_entries.rb