Sha256: 75dce09e01506248577b0568fb2cbc19f9d7c666baa3ec961321b85205d96e92

Contents?: true

Size: 552 Bytes

Versions: 13

Compression:

Stored size: 552 Bytes

Contents

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

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

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

Version data entries

13 entries across 11 versions & 1 rubygems

Version Path
muck-raker-0.1.5 db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-raker-0.1.6 db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-raker-0.1.7 db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-raker-0.1.8 db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-raker-0.1.9 db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-raker-0.1.10 db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-raker-0.1.11 db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-raker-0.1.12 db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-raker-0.1.13 db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-raker-0.1.14 test/rails_root/migrate/20090623181458_add_grain_size_to_entries.rb
muck-raker-0.1.14 db/migrate/20090623181458_add_grain_size_to_entries.rb
muck-raker-0.1.15 test/rails_root/migrate/20090623181458_add_grain_size_to_entries.rb
muck-raker-0.1.15 db/migrate/20090623181458_add_grain_size_to_entries.rb