Sha256: 78d13b8c4f3d795a703a237436b6e141b3699a42934834ddfd06834735903f58

Contents?: true

Size: 882 Bytes

Versions: 10

Compression:

Stored size: 882 Bytes

Contents

# This migration will drop spud_post_comments from your database. It has been excluded
# from the migrations directory to avoid accidential data loss on upgrading.
#
# If you wish to completely remove spud_post_comments from your app, simply copy this file
# into your db/migrations directory and run db:migrate.
# 

class DropSpudPostComments < ActiveRecord::Migration
  def up
    drop_table :spud_post_comments
    remove_column :spud_posts, :comments_count
  end
  def down
    create_table :spud_post_comments do |t|
      t.integer :spud_post_id
      t.string :author
      t.text :content
      t.boolean :approved, :default => false
      t.boolean :spam
      t.string :user_ip
      t.string :user_agent
      t.string :referrer
      t.string :permalink
      t.string :blog_key
      t.timestamps
    end
    add_column :spud_posts, :comments_count, :integer
  end
end

Version data entries

10 entries across 9 versions & 1 rubygems

Version Path
tb_blog-1.4.4 db/optional/20160216153113_drop_spud_post_comments.rb
tb_blog-1.4.3 db/optional/20160216153113_drop_spud_post_comments.rb
tb_blog-1.4.2 db/optional/20160216153113_drop_spud_post_comments.rb
tb_blog-1.3.5 db/optional/20160216153113_drop_spud_post_comments.rb
tb_blog-1.4.1 db/optional/20160216153113_drop_spud_post_comments.rb
tb_blog-1.4.0 db/optional/20160216153113_drop_spud_post_comments.rb
tb_blog-1.3.4 db/optional/20160216153113_drop_spud_post_comments.rb
tb_blog-1.4.beta1 db/optional/20160216153113_drop_spud_post_comments.rb
tb_blog-1.3.3 spec/dummy/db/migrate/20160216153113_drop_spud_post_comments.rb
tb_blog-1.3.3 db/optional/20160216153113_drop_spud_post_comments.rb