1 # This file is auto-generated from the current state of the database. Instead of editing this file,
2 # please use the migrations feature of Active Record to incrementally modify your database, and
3 # then regenerate this schema definition.
5 # Note that this schema.rb definition is the authoritative source for your database schema. If you need
6 # to create the application database on another system, you should be using db:schema:load, not running
7 # all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations
8 # you'll amass, the slower it'll run and the greater likelihood for issues).
10 # It's strongly recommended to check this file into your version control system.
12 ActiveRecord::Schema.define(:version => 9) do
14 create_table "folders", :force => true do |t|
16 t.datetime "date_modified"
17 t.integer "user_id", :default => 0
18 t.integer "parent_id", :default => 0
19 t.boolean "is_root", :default => false
22 add_index "folders", ["is_root"], :name => "index_folders_on_is_root"
23 add_index "folders", ["parent_id"], :name => "index_folders_on_parent_id"
24 add_index "folders", ["user_id"], :name => "index_folders_on_user_id"
25 add_index "folders", ["date_modified"], :name => "index_folders_on_date_modified"
26 add_index "folders", ["name"], :name => "index_folders_on_name"
28 create_table "globalize_countries", :force => true do |t|
29 t.string "code", :limit => 2
30 t.string "english_name"
31 t.string "date_format"
32 t.string "currency_format"
33 t.string "currency_code", :limit => 3
34 t.string "thousands_sep", :limit => 2
35 t.string "decimal_sep", :limit => 2
36 t.string "currency_decimal_sep", :limit => 2
37 t.string "number_grouping_scheme"
40 add_index "globalize_countries", ["code"], :name => "index_globalize_countries_on_code"
42 create_table "globalize_languages", :force => true do |t|
43 t.string "iso_639_1", :limit => 2
44 t.string "iso_639_2", :limit => 3
45 t.string "iso_639_3", :limit => 3
47 t.string "english_name"
48 t.string "english_name_locale"
49 t.string "english_name_modifier"
50 t.string "native_name"
51 t.string "native_name_locale"
52 t.string "native_name_modifier"
53 t.boolean "macro_language"
55 t.string "pluralization"
56 t.string "scope", :limit => 1
59 add_index "globalize_languages", ["rfc_3066"], :name => "index_globalize_languages_on_rfc_3066"
60 add_index "globalize_languages", ["iso_639_3"], :name => "index_globalize_languages_on_iso_639_3"
61 add_index "globalize_languages", ["iso_639_2"], :name => "index_globalize_languages_on_iso_639_2"
62 add_index "globalize_languages", ["iso_639_1"], :name => "index_globalize_languages_on_iso_639_1"
64 create_table "globalize_translations", :force => true do |t|
70 t.boolean "built_in", :default => true
71 t.integer "language_id"
72 t.integer "pluralization_index"
77 add_index "globalize_translations", ["table_name", "item_id", "language_id"], :name => "globalize_translations_table_name_and_item_and_language"
78 add_index "globalize_translations", ["tr_key", "language_id"], :name => "index_globalize_translations_on_tr_key_and_language_id"
80 create_table "group_permissions", :force => true do |t|
81 t.integer "folder_id", :default => 0
82 t.integer "group_id", :default => 0
83 t.boolean "can_create", :default => false
84 t.boolean "can_read", :default => false
85 t.boolean "can_update", :default => false
86 t.boolean "can_delete", :default => false
89 add_index "group_permissions", ["can_delete"], :name => "index_group_permissions_on_can_delete"
90 add_index "group_permissions", ["can_update"], :name => "index_group_permissions_on_can_update"
91 add_index "group_permissions", ["can_read"], :name => "index_group_permissions_on_can_read"
92 add_index "group_permissions", ["can_create"], :name => "index_group_permissions_on_can_create"
93 add_index "group_permissions", ["group_id"], :name => "index_group_permissions_on_group_id"
94 add_index "group_permissions", ["folder_id"], :name => "index_group_permissions_on_folder_id"
96 create_table "groups", :force => true do |t|
98 t.boolean "is_the_administrators_group", :default => false
101 add_index "groups", ["is_the_administrators_group"], :name => "index_groups_on_is_the_administrators_group"
102 add_index "groups", ["name"], :name => "index_groups_on_name"
104 create_table "groups_users", :id => false, :force => true do |t|
105 t.integer "group_id", :default => 0
106 t.integer "user_id", :default => 0
109 add_index "groups_users", ["group_id", "user_id"], :name => "index_groups_users_on_group_id_and_user_id"
111 create_table "histories", :force => true do |t|
113 t.integer "folder_id"
117 t.integer "recallable_id"
118 t.string "recallable_type"
119 t.datetime "created_at"
120 t.datetime "updated_at"
123 add_index "histories", ["folder_id"], :name => "index_histories_on_folder_id"
124 add_index "histories", ["remote_ip"], :name => "index_histories_on_remote_ip"
125 add_index "histories", ["updated_at"], :name => "index_histories_on_updated_at"
126 add_index "histories", ["user_id"], :name => "index_histories_on_user_id"
128 create_table "myfiles", :force => true do |t|
131 t.datetime "date_modified"
132 t.integer "folder_id", :default => 0
133 t.integer "user_id", :default => 0
134 t.boolean "indexed", :default => false
135 t.integer "version", :default => 0
136 t.boolean "thumbnailed", :default => false
139 add_index "myfiles", ["version"], :name => "index_myfiles_on_version"
140 add_index "myfiles", ["indexed"], :name => "index_myfiles_on_indexed"
141 add_index "myfiles", ["user_id"], :name => "index_myfiles_on_user_id"
142 add_index "myfiles", ["folder_id"], :name => "index_myfiles_on_folder_id"
143 add_index "myfiles", ["date_modified"], :name => "index_myfiles_on_date_modified"
144 add_index "myfiles", ["filesize"], :name => "index_myfiles_on_filesize"
145 add_index "myfiles", ["filename"], :name => "index_myfiles_on_filename"
147 create_table "taggings", :force => true do |t|
149 t.integer "taggable_id"
150 t.string "taggable_type"
151 t.datetime "created_at"
154 add_index "taggings", ["taggable_id", "taggable_type"], :name => "index_taggings_on_taggable_id_and_taggable_type"
155 add_index "taggings", ["tag_id"], :name => "index_taggings_on_tag_id"
157 create_table "tags", :force => true do |t|
161 create_table "usages", :force => true do |t|
162 t.datetime "download_date_time"
163 t.integer "myfile_id", :default => 0
164 t.integer "user_id", :default => 0
167 add_index "usages", ["user_id"], :name => "index_usages_on_user_id"
168 add_index "usages", ["myfile_id"], :name => "index_usages_on_myfile_id"
169 add_index "usages", ["download_date_time"], :name => "index_usages_on_download_date_time"
171 create_table "users", :force => true do |t|
174 t.string "hashed_password"
175 t.boolean "is_the_administrator", :default => false
176 t.string "password_salt"
177 t.string "rss_access_key"
180 add_index "users", ["rss_access_key"], :name => "index_users_on_rss_access_key"
181 add_index "users", ["password_salt"], :name => "index_users_on_password_salt"
182 add_index "users", ["is_the_administrator"], :name => "index_users_on_is_the_administrator"
183 add_index "users", ["hashed_password"], :name => "index_users_on_hashed_password"
184 add_index "users", ["email"], :name => "index_users_on_email"
185 add_index "users", ["name"], :name => "index_users_on_name"