# This file is auto-generated from the current state of the database. Instead of editing this file, # please use the migrations feature of Active Record to incrementally modify your database, and # then regenerate this schema definition. # # Note that this schema.rb definition is the authoritative source for your database schema. If you need # to create the application database on another system, you should be using db:schema:load, not running # all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations # you'll amass, the slower it'll run and the greater likelihood for issues). # # It's strongly recommended to check this file into your version control system. ActiveRecord::Schema.define(:version => 9) do create_table "attachments", :force => true do |t| t.text "elt_id", :null => false t.datetime "created_on", :null => false t.text "content_type" t.text "file" end remove_column :attachments, :id add_column :attachments, :id, :text, :null => false, :primary_key => true execute 'ALTER TABLE attachments ADD CONSTRAINT attachments_pkey PRIMARY KEY (id)' create_table "choices", :force => true do |t| t.string "elt_id", :null => false t.string "person_id" t.datetime "created_on", :null => false t.integer "value", :default => 1, :null => false end add_index "choices", ["elt_id", "person_id"], :name => "elt_person_key", :unique => true create_table "delegations", :force => true do |t| t.text "elt_id", :null => false t.text "person_id", :null => false t.datetime "created_on", :null => false t.boolean "temporary", :default => false, :null => false t.text "delegate_to", :null => false end create_table "elts", :force => true do |t| t.text "parent_id" t.float "position" t.datetime "created_on", :null => false t.text "person_id" t.text "subject" t.text "body" t.integer "lft" t.integer "rgt" t.integer "elts_count", :default => 0 t.datetime "last_activity" end add_index "elts", ["lft"], :name => "lft" add_index "elts", ["parent_id"], :name => "elts_parent" add_index "elts", ["parent_id"], :name => "elts_parent_key" add_index "elts", ["rgt"], :name => "rgt" remove_column :elts, :id add_column :elts, :id, :text, :null => false, :primary_key => true execute 'ALTER TABLE elts ADD CONSTRAINT elts_pkey PRIMARY KEY (id)' create_table "engine_schema_info", :id => false, :force => true do |t| t.string "engine_name" t.integer "version" end create_table "mails", :force => true do |t| t.text "elt_id", :null => false t.text "message" t.text "mail_parents" t.text "file" end remove_column :mails, :id add_column :mails, :id, :text, :null => false, :primary_key => true execute 'ALTER TABLE mails ADD CONSTRAINT mails_pkey PRIMARY KEY (id)' create_table "old_visits", :force => true do |t| t.string "person_id" t.string "elt_id", :null => false t.datetime "created_on", :null => false t.datetime "updated_on" t.integer "filter", :default => 0 end add_index "old_visits", ["elt_id", "person_id"], :name => "old_visits_elt_person_key", :unique => true create_table "people", :force => true do |t| t.datetime "created_on", :null => false t.text "name" t.text "email" t.text "image" t.datetime "last_login" end add_index "people", ["name"], :name => "people_name_key", :unique => true remove_column :people, :id add_column :people, :id, :text, :null => false, :primary_key => true execute 'ALTER TABLE people ADD CONSTRAINT people_pkey PRIMARY KEY (id)' create_table "person_mails", :force => true do |t| t.string "mail_id", :null => false t.string "person_id" t.datetime "created_on", :null => false end create_table "plugin_schema_info", :id => false, :force => true do |t| t.string "plugin_name" t.integer "version" end create_table "subscriptions", :force => true do |t| t.text "elt_id", :null => false t.text "person_id", :null => false t.integer "filter", :default => 0 t.datetime "created_on", :null => false end create_table "users", :force => true do |t| t.text "login", :null => false t.string "salted_password", :limit => 40, :null => false t.string "email", :limit => 60 t.string "firstname", :limit => 40 t.string "lastname", :limit => 40 t.string "salt", :limit => 40, :null => false t.integer "verified", :default => 0 t.string "role", :limit => 40 t.string "security_token", :limit => 40 t.datetime "token_expiry" t.integer "deleted", :default => 0 t.datetime "delete_after" end create_table "usersold", :force => true do |t| t.text "person_id", :null => false t.text "salted_password" t.text "salt" t.integer "verified", :default => 0 t.text "new_email" t.text "security_token" end add_index "usersold", ["person_id"], :name => "usersold_person_id_key", :unique => true create_table "visits", :force => true do |t| t.string "person_id" t.string "elt_id", :null => false t.datetime "created_on", :null => false t.datetime "updated_on" t.integer "filter", :default => 0 end add_index "visits", ["elt_id", "person_id"], :name => "visits_elt_person_key", :unique => true end