Sha256: f3b36a6667451ce1691f7ecfea3dea839b30c52f2d7d6304b5bfdc26880c4fad

Contents?: true

Size: 674 Bytes

Versions: 9

Compression:

Stored size: 674 Bytes

Contents

class CreateBlogs < ActiveRecord::Migration
  def self.up
    create_table :blogs, :force => true do |t|
      t.integer   :blogable_id, :default => 0
      t.string    :blogable_type, :limit => 15, :default => ""
      t.text      :body
      t.integer   :user_id, :default => 0, :null => false
      t.integer   :parent_id
      t.integer   :lft
      t.integer   :rgt
      t.integer   :is_denied,        :default => 0,     :null => false
      t.boolean   :is_reviewed,      :default => false
      t.timestamps
    end

    add_index :blogs, ["user_id"]
    add_index :blogs, ["blogable_id", "blogable_type"]
    
  end

  def self.down
    drop_table :blogs
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
muck-blogs-0.1.8 test/rails_root/db/migrate/20090613173314_create_comments.rb
muck-blogs-0.1.7 test/rails_root/db/migrate/20090613173314_create_comments.rb
muck-blogs-0.1.6 test/rails_root/db/migrate/20090613173314_create_comments.rb
muck-blogs-0.1.5 test/rails_root/db/migrate/20090613173314_create_comments.rb
muck-blogs-0.1.4 test/rails_root/db/migrate/20090613173314_create_comments.rb
muck-blogs-0.1.1 test/rails_root/db/migrate/20090613173314_create_comments.rb
muck-blogs-0.1.2 test/rails_root/db/migrate/20090613173314_create_comments.rb
muck-blogs-0.1.3 test/rails_root/db/migrate/20090613173314_create_comments.rb
muck-blogs-0.1.0 test/rails_root/db/migrate/20090613173314_create_comments.rb