Sha256: 5baafc1ce82fbe4cdbd887e14b3a6b0d3248adb0fe93de903532e40820e89709

Contents?: true

Size: 311 Bytes

Versions: 7

Compression:

Stored size: 311 Bytes

Contents

class RefactorCommentTable < ActiveRecord::Migration
  def change
    rename_column :inkwell_comments, "#{::Inkwell::Engine::config.post_table.to_s.singularize}_id", :topmost_obj_id
    add_column :inkwell_comments, :topmost_obj_type, :string
    ::Inkwell::Comment.update_all :topmost_obj_type => 'p'
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
inkwell-2.0.0 db/migrate/20130212130858_refactor_comment_table.rb
inkwell-1.5.2 db/migrate/20130212130858_refactor_comment_table.rb
inkwell-1.5.1 db/migrate/20130212130858_refactor_comment_table.rb
inkwell-1.4.1 db/migrate/20130212130858_refactor_comment_table.rb
inkwell-1.2.0 db/migrate/20130212130858_refactor_comment_table.rb
inkwell-1.1.7 db/migrate/20130212130858_refactor_comment_table.rb
inkwell-1.1.1 db/migrate/20130212130858_refactor_comment_table.rb