class InitialSchema < ActiveRecord::Migration def self.up create_table "contact_contact_groups", :id => false, :force => true do |t| t.column "contact_id", :integer, :limit => 20, :default => 0, :null => false t.column "contact_group_id", :integer, :limit => 20, :default => 0, :null => false end add_index "contact_contact_groups", ["contact_id"], :name => "contact_id" add_index "contact_contact_groups", ["contact_group_id"], :name => "contact_group_id" create_table "contact_groups", :force => true do |t| t.column "name", :string, :limit => 50 t.column "mail_pref_id", :integer, :limit => 20 end add_index "contact_groups", ["mail_pref_id"], :name => "mail_pref_id" create_table "contacts", :force => true do |t| t.column "fname", :string, :limit => 50 t.column "lname", :string, :limit => 50 t.column "email", :string, :limit => 100 t.column "hphone", :string, :limit => 20 t.column "wphone", :string, :limit => 20 t.column "mobile", :string, :limit => 20 t.column "fax", :string, :limit => 20 t.column "notes", :text t.column "create_date", :datetime t.column "delete_date", :datetime t.column "mail_pref_id", :integer, :limit => 20 end add_index "contacts", ["mail_pref_id"], :name => "mail_pref_id" add_index "contacts", ["mail_pref_id", "email"], :name => "mail_pref_id_2" add_index "contacts", ["email"], :name => "email" create_table "expressions", :force => true do |t| t.column "field_name", :string, :limit => 20, :default => "^Subject", :null => false t.column "operator", :string, :limit => 20, :default => "contains", :null => false t.column "expr_value", :string, :limit => 100, :default => "", :null => false t.column "case_sensitive", :boolean, :default => false t.column "filter_id", :integer, :limit => 20, :default => 0, :null => false end add_index "expressions", ["filter_id"], :name => "filter_id" create_table "filters", :force => true do |t| t.column "name", :string, :limit => 50 t.column "destination_folder", :string, :limit => 50 t.column "mail_pref_id", :integer, :limit => 20, :default => 0, :null => false t.column "order_num", :integer, :default => 1 end add_index "filters", ["mail_pref_id"], :name => "mail_pref_id" create_table "imap_messages", :force => true do |t| t.column "folder_name", :string, :limit => 100, :default => "", :null => false t.column "username", :string, :limit => 100, :default => "", :null => false t.column "msg_id", :string, :limit => 100 t.column "uid", :integer, :limit => 20, :default => 0, :null => false t.column "from", :string t.column "from_flat", :string t.column "to", :string t.column "to_flat", :string t.column "subject", :string t.column "content_type", :string, :limit => 30 t.column "date", :timestamp t.column "unread", :boolean t.column "size", :integer, :limit => 20 end add_index "imap_messages", ["folder_name", "username"], :name => "folder_name" add_index "imap_messages", ["folder_name", "username", "uid"], :name => "folder_name_2" create_table "mail_prefs", :force => true do |t| t.column "email", :string, :limit => 100, :default => "", :null => false t.column "fname", :string, :limit => 50 t.column "lname", :string, :limit => 50 t.column "mail_type", :string, :limit => 10, :default => "text/plain" t.column "wm_rows", :integer, :default => 20 t.column "check_external_mail", :boolean, :default => false end add_index "mail_prefs", ["email"], :name => "email", :unique => true create_table "sessions", :force => true do |t| t.column "session_id", :string t.column "data", :text t.column "updated_at", :timestamp end add_index "sessions", ["session_id"], :name => "session_id" end def self.down drop_table "contact_contact_groups" drop_table "contact_groups" drop_table "contacts" drop_table "expressions" drop_table "filters" drop_table "imap_messages" drop_table "mail_prefs" drop_table "sessions" end end