Imported punbb.sql for future reference
[punbbonrails.git] / db / migrate / 007_create_topics.rb
blobbf179090653c3b7349fc3738580bf988a8bd32f4
1 class CreateTopics < ActiveRecord::Migration
2   def self.up
3     create_table :topics do |t|
4       t.column "poster", :string, :limit => 200, :default => "", :null => false
5       t.column "subject", :string, :default => "", :null => false
6       t.column "created_at", :timestamp, :limit => 14, :null => false
7       t.column "last_post", :timestamp, :limit => 14, :null => false
8       t.column "last_post_id", :integer, :limit => 10, :default => 0, :null => false
9       t.column "last_poster", :string, :limit => 200
10       t.column "num_views", :integer, :limit => 8, :default => 0, :null => false
11       t.column "num_replies", :integer, :limit => 8, :default => 0, :null => false
12       t.column "closed", :boolean, :default => false, :null => false
13       t.column "sticky", :boolean, :default => false, :null => false
14       t.column "moved_to", :integer, :limit => 10
15       t.column "forum_id", :integer, :limit => 10, :default => 0, :null => false
16     end
17     add_index "topics", ["forum_id"], :name => "topics_forum_id_idx"