# This file is autogenerated. Instead of editing this file, please use the # migrations feature of ActiveRecord to incrementally modify your database, and # then regenerate this schema definition. ActiveRecord::Schema.define(:version => 12) do create_table "attachments", :force => true do |t| t.column "created_at", :datetime, :null => false t.column "updated_at", :datetime, :null => false t.column "filename", :string, :limit => 60, :null => false t.column "post_id", :integer t.column "position", :integer end create_table "blocked_ips", :force => true do |t| t.column "created_at", :datetime, :null => false t.column "updated_at", :datetime, :null => false t.column "ip", :string, :limit => 20, :null => false end add_index "blocked_ips", ["ip"], :name => "blocked_ips_1uq", :unique => true create_table "forums", :force => true do |t| t.column "created_at", :datetime, :null => false t.column "updated_at", :datetime, :null => false t.column "name", :string, :limit => 60, :null => false t.column "description", :string, :null => false t.column "groupname", :string, :limit => 50 t.column "list_address", :string, :limit => 50 t.column "position", :integer t.column "add_mail_headers", :string t.column "site_id", :integer t.column "readonly", :integer, :default => 0, :null => false t.column "ml_from_address", :string, :limit => 60 end add_index "forums", ["groupname"], :name => "forums_1uq", :unique => true create_table "post_votes", :force => true do |t| t.column "created_at", :datetime, :null => false t.column "updated_at", :datetime, :null => false t.column "post_id", :integer, :null => false t.column "voter_id", :integer, :null => false t.column "value", :integer, :null => false end add_index "post_votes", ["post_id"], :name => "post_votes_1ix" add_index "post_votes", ["voter_id"], :name => "post_votes_2ix" add_index "post_votes", ["post_id", "voter_id"], :name => "post_votes_uq1" create_table "posts", :force => true do |t| t.column "created_at", :datetime, :null => false t.column "updated_at", :datetime, :null => false t.column "topic_id", :integer, :null => false t.column "l", :integer, :null => false t.column "r", :integer, :null => false t.column "parent_id", :integer t.column "user_id", :integer t.column "deleted", :integer, :default => 0, :null => false t.column "guest_name", :string, :limit => 50 t.column "guest_email", :string, :limit => 50 t.column "author_host", :string, :limit => 50 t.column "subject", :string, :limit => 100, :null => false t.column "nntpid", :integer, :null => false t.column "messageid", :string, :limit => 100, :null => false t.column "text", :text, :null => false t.column "post_method", :string, :limit => 10, :default => "web", :null => false end add_index "posts", ["l", "r", "parent_id"], :name => "posts_1ix" add_index "posts", ["messageid"], :name => "posts_1uq", :unique => true add_index "posts", ["messageid"], :name => "posts_2ix" add_index "posts", ["id", "created_at", "topic_id", "deleted"], :name => "posts_3ix" add_index "posts", ["created_at"], :name => "posts_4ix" add_index "posts", ["l"], :name => "posts_5ix" add_index "posts", ["r"], :name => "posts_6ix" add_index "posts", ["parent_id"], :name => "posts_7ix" add_index "posts", ["user_id"], :name => "posts_8ix" add_index "posts", ["nntpid"], :name => "posts_9ix" create_table "search_index_items", :force => true do |t| t.column "post_id", :integer, :null => false t.column "subject", :string, :limit => 60, :null => false t.column "text", :text, :null => false end create_table "sessions", :force => true do |t| t.column "sessid", :string, :limit => 60, :null => false t.column "data", :text t.column "updated_at", :datetime t.column "created_at", :datetime end add_index "sessions", ["sessid"], :name => "sessions_1uq", :unique => true create_table "sites", :force => true do |t| t.column "created_at", :datetime, :null => false t.column "updated_at", :datetime, :null => false t.column "host", :string, :limit => 60 t.column "language", :string, :limit => 5 t.column "layout", :string, :limit => 20 t.column "skin", :string, :limit => 20 t.column "owner_id", :integer t.column "position", :integer end create_table "tags", :force => true do |t| t.column "name", :string, :limit => 60, :null => false end create_table "topic_reads", :force => true do |t| t.column "created_at", :datetime, :null => false t.column "updated_at", :datetime, :null => false t.column "user_id", :integer, :null => false t.column "topic_id", :integer, :null => false end add_index "topic_reads", ["user_id", "topic_id"], :name => "topic_reads_1uq", :unique => true create_table "topic_subscriptions", :force => true do |t| t.column "created_at", :datetime, :null => false t.column "updated_at", :datetime, :null => false t.column "topic_id", :integer, :null => false t.column "user_id", :integer t.column "guest_email", :string, :limit => 50 end add_index "topic_subscriptions", ["topic_id", "user_id"], :name => "topic_subscribers_1uq", :unique => true add_index "topic_subscriptions", ["topic_id", "guest_email"], :name => "topic_subscribers_2uq", :unique => true create_table "topics", :force => true do |t| t.column "created_at", :datetime, :null => false t.column "updated_at", :datetime, :null => false t.column "forum_id", :integer, :null => false t.column "subject", :string, :limit => 60, :null => false t.column "last_post_created_at", :datetime t.column "last_post_user_id", :integer t.column "last_post_author", :string, :limit => 60 t.column "last_post_subject", :string, :limit => 60 t.column "deleted", :integer, :default => 0, :null => false t.column "post_counter", :integer, :default => 1 end add_index "topics", ["forum_id", "last_post_created_at", "deleted"], :name => "topics_1ix" create_table "topics_tags", :id => false, :force => true do |t| t.column "topic_id", :integer, :null => false t.column "tag_id", :integer, :null => false end add_index "topics_tags", ["topic_id", "tag_id"], :name => "topics_tags_1uq", :unique => true create_table "users", :force => true do |t| t.column "created_at", :datetime, :null => false t.column "updated_at", :datetime, :null => false t.column "role", :string, :limit => 50, :null => false t.column "name", :string, :limit => 64, :null => false t.column "email", :string, :null => false t.column "firstname", :string, :limit => 160 t.column "surname", :string, :limit => 30 t.column "password", :string, :limit => 40, :null => false t.column "security_token", :string, :limit => 40 t.column "additional_information", :text t.column "token_expiry", :datetime t.column "receives_email", :integer, :default => 0, :null => false t.column "sends_email", :integer, :default => 0, :null => false t.column "salt", :string, :limit => 40 t.column "activated", :integer, :default => 0, :null => false end add_index "users", ["role"], :name => "users_1ix" add_index "users", ["name"], :name => "users_1uq", :unique => true end