Sha256: aad89d79dce74931372e882207d2bcffdf9ce199786a823b759a2ff92ca63b41

Contents?: true

Size: 711 Bytes

Versions: 2

Compression:

Stored size: 711 Bytes

Contents

class CreateSimpleForumTopics < ::ActiveRecord::Migration
  def self.up
    create_table :simple_forum_topics do |t|
      t.references :forum
      t.references :user

      t.string :title
      t.boolean :is_closed, :default => false

      t.references :recent_post
      t.datetime :last_updated_at

      t.integer :posts_count, :default => 0
      t.integer :views_count, :default => 0

      t.string :slug_cache

      t.timestamps
    end

    add_index :simple_forum_topics, :forum_id
    add_index :simple_forum_topics, :user_id
    add_index :simple_forum_topics, :last_updated_at
    add_index :simple_forum_topics, :slug_cache
  end

  def self.down
    drop_table :simple_forum_topics
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
simple_forum-0.0.4 db/migrate/20110330123457_create_simple_forum_topics.rb
simple_forum-0.0.2 db/migrate/20110330123457_create_simple_forum_topics.rb