Commit 947bf54cb6e95d74b36909aaf927289912a9c1ae
1 parent
4511d505
Exists in
master
and in
20 other branches
db/schema.rb: update to Rails 4 conventions
It uses more modern Ruby syntax, but it's mostly the same thing.
Showing
1 changed file
with
287 additions
and
284 deletions
Show diff stats
db/schema.rb
| ... | ... | @@ -9,11 +9,14 @@ |
| 9 | 9 | # from scratch. The latter is a flawed and unsustainable approach (the more migrations |
| 10 | 10 | # you'll amass, the slower it'll run and the greater likelihood for issues). |
| 11 | 11 | # |
| 12 | -# It's strongly recommended to check this file into your version control system. | |
| 12 | +# It's strongly recommended that you check this file into your version control system. | |
| 13 | 13 | |
| 14 | -ActiveRecord::Schema.define(:version => 20150722042714) do | |
| 14 | +ActiveRecord::Schema.define(version: 20150722042714) do | |
| 15 | 15 | |
| 16 | - create_table "abuse_reports", :force => true do |t| | |
| 16 | + # These are extensions that must be enabled in order to support this database | |
| 17 | + enable_extension "plpgsql" | |
| 18 | + | |
| 19 | + create_table "abuse_reports", force: :cascade do |t| | |
| 17 | 20 | t.integer "reporter_id" |
| 18 | 21 | t.integer "abuse_complaint_id" |
| 19 | 22 | t.text "content" |
| ... | ... | @@ -22,7 +25,7 @@ ActiveRecord::Schema.define(:version => 20150722042714) do |
| 22 | 25 | t.datetime "updated_at" |
| 23 | 26 | end |
| 24 | 27 | |
| 25 | - create_table "action_tracker", :force => true do |t| | |
| 28 | + create_table "action_tracker", force: :cascade do |t| | |
| 26 | 29 | t.integer "user_id" |
| 27 | 30 | t.string "user_type" |
| 28 | 31 | t.integer "target_id" |
| ... | ... | @@ -31,34 +34,34 @@ ActiveRecord::Schema.define(:version => 20150722042714) do |
| 31 | 34 | t.string "verb" |
| 32 | 35 | t.datetime "created_at" |
| 33 | 36 | t.datetime "updated_at" |
| 34 | - t.integer "comments_count", :default => 0 | |
| 35 | - t.boolean "visible", :default => true | |
| 37 | + t.integer "comments_count", default: 0 | |
| 38 | + t.boolean "visible", default: true | |
| 36 | 39 | end |
| 37 | 40 | |
| 38 | - add_index "action_tracker", ["target_id", "target_type"], :name => "index_action_tracker_on_dispatcher_id_and_dispatcher_type" | |
| 39 | - add_index "action_tracker", ["user_id", "user_type"], :name => "index_action_tracker_on_user_id_and_user_type" | |
| 40 | - add_index "action_tracker", ["verb"], :name => "index_action_tracker_on_verb" | |
| 41 | + add_index "action_tracker", ["target_id", "target_type"], name: "index_action_tracker_on_dispatcher_id_and_dispatcher_type", using: :btree | |
| 42 | + add_index "action_tracker", ["user_id", "user_type"], name: "index_action_tracker_on_user_id_and_user_type", using: :btree | |
| 43 | + add_index "action_tracker", ["verb"], name: "index_action_tracker_on_verb", using: :btree | |
| 41 | 44 | |
| 42 | - create_table "action_tracker_notifications", :force => true do |t| | |
| 45 | + create_table "action_tracker_notifications", force: :cascade do |t| | |
| 43 | 46 | t.integer "action_tracker_id" |
| 44 | 47 | t.integer "profile_id" |
| 45 | 48 | end |
| 46 | 49 | |
| 47 | - add_index "action_tracker_notifications", ["action_tracker_id"], :name => "index_action_tracker_notifications_on_action_tracker_id" | |
| 48 | - add_index "action_tracker_notifications", ["profile_id", "action_tracker_id"], :name => "index_action_tracker_notif_on_prof_id_act_tracker_id", :unique => true | |
| 49 | - add_index "action_tracker_notifications", ["profile_id"], :name => "index_action_tracker_notifications_on_profile_id" | |
| 50 | + add_index "action_tracker_notifications", ["action_tracker_id"], name: "index_action_tracker_notifications_on_action_tracker_id", using: :btree | |
| 51 | + add_index "action_tracker_notifications", ["profile_id", "action_tracker_id"], name: "index_action_tracker_notif_on_prof_id_act_tracker_id", unique: true, using: :btree | |
| 52 | + add_index "action_tracker_notifications", ["profile_id"], name: "index_action_tracker_notifications_on_profile_id", using: :btree | |
| 50 | 53 | |
| 51 | - create_table "article_privacy_exceptions", :id => false, :force => true do |t| | |
| 54 | + create_table "article_privacy_exceptions", id: false, force: :cascade do |t| | |
| 52 | 55 | t.integer "article_id" |
| 53 | 56 | t.integer "person_id" |
| 54 | 57 | end |
| 55 | 58 | |
| 56 | - create_table "article_versions", :force => true do |t| | |
| 59 | + create_table "article_versions", force: :cascade do |t| | |
| 57 | 60 | t.integer "article_id" |
| 58 | 61 | t.integer "version" |
| 59 | 62 | t.string "name" |
| 60 | 63 | t.string "slug" |
| 61 | - t.text "path", :default => "" | |
| 64 | + t.text "path", default: "" | |
| 62 | 65 | t.integer "parent_id" |
| 63 | 66 | t.text "body" |
| 64 | 67 | t.text "abstract" |
| ... | ... | @@ -73,43 +76,43 @@ ActiveRecord::Schema.define(:version => 20150722042714) do |
| 73 | 76 | t.integer "width" |
| 74 | 77 | t.string "versioned_type" |
| 75 | 78 | t.integer "comments_count" |
| 76 | - t.boolean "advertise", :default => true | |
| 77 | - t.boolean "published", :default => true | |
| 79 | + t.boolean "advertise", default: true | |
| 80 | + t.boolean "published", default: true | |
| 78 | 81 | t.datetime "start_date" |
| 79 | 82 | t.datetime "end_date" |
| 80 | - t.integer "children_count", :default => 0 | |
| 81 | - t.boolean "accept_comments", :default => true | |
| 83 | + t.integer "children_count", default: 0 | |
| 84 | + t.boolean "accept_comments", default: true | |
| 82 | 85 | t.integer "reference_article_id" |
| 83 | 86 | t.text "setting" |
| 84 | - t.boolean "notify_comments", :default => false | |
| 85 | - t.integer "hits", :default => 0 | |
| 87 | + t.boolean "notify_comments", default: false | |
| 88 | + t.integer "hits", default: 0 | |
| 86 | 89 | t.datetime "published_at" |
| 87 | 90 | t.string "source" |
| 88 | - t.boolean "highlighted", :default => false | |
| 91 | + t.boolean "highlighted", default: false | |
| 89 | 92 | t.string "external_link" |
| 90 | - t.boolean "thumbnails_processed", :default => false | |
| 91 | - t.boolean "is_image", :default => false | |
| 93 | + t.boolean "thumbnails_processed", default: false | |
| 94 | + t.boolean "is_image", default: false | |
| 92 | 95 | t.integer "translation_of_id" |
| 93 | 96 | t.string "language" |
| 94 | 97 | t.string "source_name" |
| 95 | 98 | t.integer "license_id" |
| 96 | 99 | t.integer "image_id" |
| 97 | 100 | t.integer "position" |
| 98 | - t.integer "spam_comments_count", :default => 0 | |
| 101 | + t.integer "spam_comments_count", default: 0 | |
| 99 | 102 | t.integer "author_id" |
| 100 | 103 | t.integer "created_by_id" |
| 101 | 104 | end |
| 102 | 105 | |
| 103 | - add_index "article_versions", ["article_id"], :name => "index_article_versions_on_article_id" | |
| 104 | - add_index "article_versions", ["parent_id"], :name => "index_article_versions_on_parent_id" | |
| 105 | - add_index "article_versions", ["path", "profile_id"], :name => "index_article_versions_on_path_and_profile_id" | |
| 106 | - add_index "article_versions", ["path"], :name => "index_article_versions_on_path" | |
| 107 | - add_index "article_versions", ["published_at", "id"], :name => "index_article_versions_on_published_at_and_id" | |
| 106 | + add_index "article_versions", ["article_id"], name: "index_article_versions_on_article_id", using: :btree | |
| 107 | + add_index "article_versions", ["parent_id"], name: "index_article_versions_on_parent_id", using: :btree | |
| 108 | + add_index "article_versions", ["path", "profile_id"], name: "index_article_versions_on_path_and_profile_id", using: :btree | |
| 109 | + add_index "article_versions", ["path"], name: "index_article_versions_on_path", using: :btree | |
| 110 | + add_index "article_versions", ["published_at", "id"], name: "index_article_versions_on_published_at_and_id", using: :btree | |
| 108 | 111 | |
| 109 | - create_table "articles", :force => true do |t| | |
| 112 | + create_table "articles", force: :cascade do |t| | |
| 110 | 113 | t.string "name" |
| 111 | 114 | t.string "slug" |
| 112 | - t.text "path", :default => "" | |
| 115 | + t.text "path", default: "" | |
| 113 | 116 | t.integer "parent_id" |
| 114 | 117 | t.text "body" |
| 115 | 118 | t.text "abstract" |
| ... | ... | @@ -124,119 +127,119 @@ ActiveRecord::Schema.define(:version => 20150722042714) do |
| 124 | 127 | t.string "filename" |
| 125 | 128 | t.integer "height" |
| 126 | 129 | t.integer "width" |
| 127 | - t.integer "comments_count", :default => 0 | |
| 128 | - t.boolean "advertise", :default => true | |
| 129 | - t.boolean "published", :default => true | |
| 130 | + t.integer "comments_count", default: 0 | |
| 131 | + t.boolean "advertise", default: true | |
| 132 | + t.boolean "published", default: true | |
| 130 | 133 | t.datetime "start_date" |
| 131 | 134 | t.datetime "end_date" |
| 132 | - t.integer "children_count", :default => 0 | |
| 133 | - t.boolean "accept_comments", :default => true | |
| 135 | + t.integer "children_count", default: 0 | |
| 136 | + t.boolean "accept_comments", default: true | |
| 134 | 137 | t.integer "reference_article_id" |
| 135 | 138 | t.text "setting" |
| 136 | - t.boolean "notify_comments", :default => true | |
| 137 | - t.integer "hits", :default => 0 | |
| 139 | + t.boolean "notify_comments", default: true | |
| 140 | + t.integer "hits", default: 0 | |
| 138 | 141 | t.datetime "published_at" |
| 139 | 142 | t.string "source" |
| 140 | - t.boolean "highlighted", :default => false | |
| 143 | + t.boolean "highlighted", default: false | |
| 141 | 144 | t.string "external_link" |
| 142 | - t.boolean "thumbnails_processed", :default => false | |
| 143 | - t.boolean "is_image", :default => false | |
| 145 | + t.boolean "thumbnails_processed", default: false | |
| 146 | + t.boolean "is_image", default: false | |
| 144 | 147 | t.integer "translation_of_id" |
| 145 | 148 | t.string "language" |
| 146 | 149 | t.string "source_name" |
| 147 | 150 | t.integer "license_id" |
| 148 | 151 | t.integer "image_id" |
| 149 | 152 | t.integer "position" |
| 150 | - t.integer "spam_comments_count", :default => 0 | |
| 153 | + t.integer "spam_comments_count", default: 0 | |
| 151 | 154 | t.integer "author_id" |
| 152 | 155 | t.integer "created_by_id" |
| 153 | - t.boolean "show_to_followers", :default => true | |
| 154 | - end | |
| 155 | - | |
| 156 | - add_index "articles", ["comments_count"], :name => "index_articles_on_comments_count" | |
| 157 | - add_index "articles", ["created_at"], :name => "index_articles_on_created_at" | |
| 158 | - add_index "articles", ["hits"], :name => "index_articles_on_hits" | |
| 159 | - add_index "articles", ["name"], :name => "index_articles_on_name" | |
| 160 | - add_index "articles", ["parent_id"], :name => "index_articles_on_parent_id" | |
| 161 | - add_index "articles", ["path", "profile_id"], :name => "index_articles_on_path_and_profile_id" | |
| 162 | - add_index "articles", ["path"], :name => "index_articles_on_path" | |
| 163 | - add_index "articles", ["profile_id"], :name => "index_articles_on_profile_id" | |
| 164 | - add_index "articles", ["published_at", "id"], :name => "index_articles_on_published_at_and_id" | |
| 165 | - add_index "articles", ["slug"], :name => "index_articles_on_slug" | |
| 166 | - add_index "articles", ["translation_of_id"], :name => "index_articles_on_translation_of_id" | |
| 167 | - add_index "articles", ["type", "parent_id"], :name => "index_articles_on_type_and_parent_id" | |
| 168 | - add_index "articles", ["type", "profile_id"], :name => "index_articles_on_type_and_profile_id" | |
| 169 | - add_index "articles", ["type"], :name => "index_articles_on_type" | |
| 170 | - | |
| 171 | - create_table "articles_categories", :id => false, :force => true do |t| | |
| 156 | + t.boolean "show_to_followers", default: true | |
| 157 | + end | |
| 158 | + | |
| 159 | + add_index "articles", ["comments_count"], name: "index_articles_on_comments_count", using: :btree | |
| 160 | + add_index "articles", ["created_at"], name: "index_articles_on_created_at", using: :btree | |
| 161 | + add_index "articles", ["hits"], name: "index_articles_on_hits", using: :btree | |
| 162 | + add_index "articles", ["name"], name: "index_articles_on_name", using: :btree | |
| 163 | + add_index "articles", ["parent_id"], name: "index_articles_on_parent_id", using: :btree | |
| 164 | + add_index "articles", ["path", "profile_id"], name: "index_articles_on_path_and_profile_id", using: :btree | |
| 165 | + add_index "articles", ["path"], name: "index_articles_on_path", using: :btree | |
| 166 | + add_index "articles", ["profile_id"], name: "index_articles_on_profile_id", using: :btree | |
| 167 | + add_index "articles", ["published_at", "id"], name: "index_articles_on_published_at_and_id", using: :btree | |
| 168 | + add_index "articles", ["slug"], name: "index_articles_on_slug", using: :btree | |
| 169 | + add_index "articles", ["translation_of_id"], name: "index_articles_on_translation_of_id", using: :btree | |
| 170 | + add_index "articles", ["type", "parent_id"], name: "index_articles_on_type_and_parent_id", using: :btree | |
| 171 | + add_index "articles", ["type", "profile_id"], name: "index_articles_on_type_and_profile_id", using: :btree | |
| 172 | + add_index "articles", ["type"], name: "index_articles_on_type", using: :btree | |
| 173 | + | |
| 174 | + create_table "articles_categories", id: false, force: :cascade do |t| | |
| 172 | 175 | t.integer "article_id" |
| 173 | 176 | t.integer "category_id" |
| 174 | - t.boolean "virtual", :default => false | |
| 177 | + t.boolean "virtual", default: false | |
| 175 | 178 | end |
| 176 | 179 | |
| 177 | - add_index "articles_categories", ["article_id"], :name => "index_articles_categories_on_article_id" | |
| 178 | - add_index "articles_categories", ["category_id"], :name => "index_articles_categories_on_category_id" | |
| 180 | + add_index "articles_categories", ["article_id"], name: "index_articles_categories_on_article_id", using: :btree | |
| 181 | + add_index "articles_categories", ["category_id"], name: "index_articles_categories_on_category_id", using: :btree | |
| 179 | 182 | |
| 180 | - create_table "blocks", :force => true do |t| | |
| 183 | + create_table "blocks", force: :cascade do |t| | |
| 181 | 184 | t.string "title" |
| 182 | 185 | t.integer "box_id" |
| 183 | 186 | t.string "type" |
| 184 | 187 | t.text "settings" |
| 185 | 188 | t.integer "position" |
| 186 | - t.boolean "enabled", :default => true | |
| 189 | + t.boolean "enabled", default: true | |
| 187 | 190 | t.datetime "created_at" |
| 188 | 191 | t.datetime "updated_at" |
| 189 | 192 | t.datetime "fetched_at" |
| 190 | - t.boolean "mirror", :default => false | |
| 193 | + t.boolean "mirror", default: false | |
| 191 | 194 | t.integer "mirror_block_id" |
| 192 | 195 | t.integer "observers_id" |
| 193 | 196 | end |
| 194 | 197 | |
| 195 | - add_index "blocks", ["box_id"], :name => "index_blocks_on_box_id" | |
| 196 | - add_index "blocks", ["enabled"], :name => "index_blocks_on_enabled" | |
| 197 | - add_index "blocks", ["fetched_at"], :name => "index_blocks_on_fetched_at" | |
| 198 | - add_index "blocks", ["type"], :name => "index_blocks_on_type" | |
| 198 | + add_index "blocks", ["box_id"], name: "index_blocks_on_box_id", using: :btree | |
| 199 | + add_index "blocks", ["enabled"], name: "index_blocks_on_enabled", using: :btree | |
| 200 | + add_index "blocks", ["fetched_at"], name: "index_blocks_on_fetched_at", using: :btree | |
| 201 | + add_index "blocks", ["type"], name: "index_blocks_on_type", using: :btree | |
| 199 | 202 | |
| 200 | - create_table "boxes", :force => true do |t| | |
| 203 | + create_table "boxes", force: :cascade do |t| | |
| 201 | 204 | t.string "owner_type" |
| 202 | 205 | t.integer "owner_id" |
| 203 | 206 | t.integer "position" |
| 204 | 207 | end |
| 205 | 208 | |
| 206 | - add_index "boxes", ["owner_id", "owner_type"], :name => "index_boxes_on_owner_type_and_owner_id" | |
| 209 | + add_index "boxes", ["owner_id", "owner_type"], name: "index_boxes_on_owner_type_and_owner_id", using: :btree | |
| 207 | 210 | |
| 208 | - create_table "categories", :force => true do |t| | |
| 211 | + create_table "categories", force: :cascade do |t| | |
| 209 | 212 | t.string "name" |
| 210 | 213 | t.string "slug" |
| 211 | - t.text "path", :default => "" | |
| 214 | + t.text "path", default: "" | |
| 212 | 215 | t.integer "environment_id" |
| 213 | 216 | t.integer "parent_id" |
| 214 | 217 | t.string "type" |
| 215 | 218 | t.float "lat" |
| 216 | 219 | t.float "lng" |
| 217 | - t.boolean "display_in_menu", :default => false | |
| 218 | - t.integer "children_count", :default => 0 | |
| 219 | - t.boolean "accept_products", :default => true | |
| 220 | + t.boolean "display_in_menu", default: false | |
| 221 | + t.integer "children_count", default: 0 | |
| 222 | + t.boolean "accept_products", default: true | |
| 220 | 223 | t.integer "image_id" |
| 221 | 224 | t.string "acronym" |
| 222 | 225 | t.string "abbreviation" |
| 223 | - t.string "display_color", :limit => 6 | |
| 226 | + t.string "display_color", limit: 6 | |
| 224 | 227 | t.text "ancestry" |
| 225 | 228 | end |
| 226 | 229 | |
| 227 | - add_index "categories", ["parent_id"], :name => "index_categories_on_parent_id" | |
| 230 | + add_index "categories", ["parent_id"], name: "index_categories_on_parent_id", using: :btree | |
| 228 | 231 | |
| 229 | - create_table "categories_profiles", :id => false, :force => true do |t| | |
| 232 | + create_table "categories_profiles", id: false, force: :cascade do |t| | |
| 230 | 233 | t.integer "profile_id" |
| 231 | 234 | t.integer "category_id" |
| 232 | - t.boolean "virtual", :default => false | |
| 235 | + t.boolean "virtual", default: false | |
| 233 | 236 | end |
| 234 | 237 | |
| 235 | - add_index "categories_profiles", ["category_id"], :name => "index_categories_profiles_on_category_id" | |
| 236 | - add_index "categories_profiles", ["profile_id"], :name => "index_categories_profiles_on_profile_id" | |
| 238 | + add_index "categories_profiles", ["category_id"], name: "index_categories_profiles_on_category_id", using: :btree | |
| 239 | + add_index "categories_profiles", ["profile_id"], name: "index_categories_profiles_on_profile_id", using: :btree | |
| 237 | 240 | |
| 238 | - create_table "certifiers", :force => true do |t| | |
| 239 | - t.string "name", :null => false | |
| 241 | + create_table "certifiers", force: :cascade do |t| | |
| 242 | + t.string "name", null: false | |
| 240 | 243 | t.text "description" |
| 241 | 244 | t.string "link" |
| 242 | 245 | t.integer "environment_id" |
| ... | ... | @@ -244,19 +247,19 @@ ActiveRecord::Schema.define(:version => 20150722042714) do |
| 244 | 247 | t.datetime "updated_at" |
| 245 | 248 | end |
| 246 | 249 | |
| 247 | - create_table "chat_messages", :force => true do |t| | |
| 248 | - t.integer "from_id", :null => false | |
| 249 | - t.integer "to_id", :null => false | |
| 250 | + create_table "chat_messages", force: :cascade do |t| | |
| 251 | + t.integer "from_id", null: false | |
| 252 | + t.integer "to_id", null: false | |
| 250 | 253 | t.text "body" |
| 251 | - t.datetime "created_at", :null => false | |
| 252 | - t.datetime "updated_at", :null => false | |
| 254 | + t.datetime "created_at", null: false | |
| 255 | + t.datetime "updated_at", null: false | |
| 253 | 256 | end |
| 254 | 257 | |
| 255 | - add_index "chat_messages", ["created_at"], :name => "index_chat_messages_on_created_at" | |
| 256 | - add_index "chat_messages", ["from_id"], :name => "index_chat_messages_on_from_id" | |
| 257 | - add_index "chat_messages", ["to_id"], :name => "index_chat_messages_on_to_id" | |
| 258 | + add_index "chat_messages", ["created_at"], name: "index_chat_messages_on_created_at", using: :btree | |
| 259 | + add_index "chat_messages", ["from_id"], name: "index_chat_messages_on_from_id", using: :btree | |
| 260 | + add_index "chat_messages", ["to_id"], name: "index_chat_messages_on_to_id", using: :btree | |
| 258 | 261 | |
| 259 | - create_table "comments", :force => true do |t| | |
| 262 | + create_table "comments", force: :cascade do |t| | |
| 260 | 263 | t.string "title" |
| 261 | 264 | t.text "body" |
| 262 | 265 | t.integer "source_id" |
| ... | ... | @@ -273,19 +276,19 @@ ActiveRecord::Schema.define(:version => 20150722042714) do |
| 273 | 276 | t.text "settings" |
| 274 | 277 | end |
| 275 | 278 | |
| 276 | - add_index "comments", ["source_id", "spam"], :name => "index_comments_on_source_id_and_spam" | |
| 279 | + add_index "comments", ["source_id", "spam"], name: "index_comments_on_source_id_and_spam", using: :btree | |
| 277 | 280 | |
| 278 | - create_table "contact_lists", :force => true do |t| | |
| 281 | + create_table "contact_lists", force: :cascade do |t| | |
| 279 | 282 | t.text "list" |
| 280 | 283 | t.string "error_fetching" |
| 281 | - t.boolean "fetched", :default => false | |
| 284 | + t.boolean "fetched", default: false | |
| 282 | 285 | t.datetime "created_at" |
| 283 | 286 | t.datetime "updated_at" |
| 284 | 287 | end |
| 285 | 288 | |
| 286 | - create_table "delayed_jobs", :force => true do |t| | |
| 287 | - t.integer "priority", :default => 0 | |
| 288 | - t.integer "attempts", :default => 0 | |
| 289 | + create_table "delayed_jobs", force: :cascade do |t| | |
| 290 | + t.integer "priority", default: 0 | |
| 291 | + t.integer "attempts", default: 0 | |
| 289 | 292 | t.text "handler" |
| 290 | 293 | t.text "last_error" |
| 291 | 294 | t.datetime "run_at" |
| ... | ... | @@ -297,22 +300,22 @@ ActiveRecord::Schema.define(:version => 20150722042714) do |
| 297 | 300 | t.string "queue" |
| 298 | 301 | end |
| 299 | 302 | |
| 300 | - add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority" | |
| 303 | + add_index "delayed_jobs", ["priority", "run_at"], name: "delayed_jobs_priority", using: :btree | |
| 301 | 304 | |
| 302 | - create_table "domains", :force => true do |t| | |
| 305 | + create_table "domains", force: :cascade do |t| | |
| 303 | 306 | t.string "name" |
| 304 | 307 | t.string "owner_type" |
| 305 | 308 | t.integer "owner_id" |
| 306 | - t.boolean "is_default", :default => false | |
| 309 | + t.boolean "is_default", default: false | |
| 307 | 310 | t.string "google_maps_key" |
| 308 | 311 | end |
| 309 | 312 | |
| 310 | - add_index "domains", ["is_default"], :name => "index_domains_on_is_default" | |
| 311 | - add_index "domains", ["name"], :name => "index_domains_on_name" | |
| 312 | - add_index "domains", ["owner_id", "owner_type", "is_default"], :name => "index_domains_on_owner_id_and_owner_type_and_is_default" | |
| 313 | - add_index "domains", ["owner_id", "owner_type"], :name => "index_domains_on_owner_id_and_owner_type" | |
| 313 | + add_index "domains", ["is_default"], name: "index_domains_on_is_default", using: :btree | |
| 314 | + add_index "domains", ["name"], name: "index_domains_on_name", using: :btree | |
| 315 | + add_index "domains", ["owner_id", "owner_type", "is_default"], name: "index_domains_on_owner_id_and_owner_type_and_is_default", using: :btree | |
| 316 | + add_index "domains", ["owner_id", "owner_type"], name: "index_domains_on_owner_id_and_owner_type", using: :btree | |
| 314 | 317 | |
| 315 | - create_table "environments", :force => true do |t| | |
| 318 | + create_table "environments", force: :cascade do |t| | |
| 316 | 319 | t.string "name" |
| 317 | 320 | t.string "contact_email" |
| 318 | 321 | t.boolean "is_default" |
| ... | ... | @@ -320,60 +323,60 @@ ActiveRecord::Schema.define(:version => 20150722042714) do |
| 320 | 323 | t.text "design_data" |
| 321 | 324 | t.text "custom_header" |
| 322 | 325 | t.text "custom_footer" |
| 323 | - t.string "theme", :default => "default", :null => false | |
| 326 | + t.string "theme", default: "default", null: false | |
| 324 | 327 | t.text "terms_of_use_acceptance_text" |
| 325 | 328 | t.datetime "created_at" |
| 326 | 329 | t.datetime "updated_at" |
| 327 | - t.integer "reports_lower_bound", :default => 0, :null => false | |
| 328 | - t.string "redirection_after_login", :default => "keep_on_same_page" | |
| 330 | + t.integer "reports_lower_bound", default: 0, null: false | |
| 331 | + t.string "redirection_after_login", default: "keep_on_same_page" | |
| 329 | 332 | t.text "signup_welcome_text" |
| 330 | 333 | t.string "languages" |
| 331 | 334 | t.string "default_language" |
| 332 | 335 | t.string "noreply_email" |
| 333 | - t.string "redirection_after_signup", :default => "keep_on_same_page" | |
| 334 | - t.string "date_format", :default => "month_name_with_year" | |
| 336 | + t.string "redirection_after_signup", default: "keep_on_same_page" | |
| 337 | + t.string "date_format", default: "month_name_with_year" | |
| 335 | 338 | end |
| 336 | 339 | |
| 337 | - create_table "external_feeds", :force => true do |t| | |
| 340 | + create_table "external_feeds", force: :cascade do |t| | |
| 338 | 341 | t.string "feed_title" |
| 339 | 342 | t.datetime "fetched_at" |
| 340 | 343 | t.text "address" |
| 341 | - t.integer "blog_id", :null => false | |
| 342 | - t.boolean "enabled", :default => true, :null => false | |
| 343 | - t.boolean "only_once", :default => true, :null => false | |
| 344 | + t.integer "blog_id", null: false | |
| 345 | + t.boolean "enabled", default: true, null: false | |
| 346 | + t.boolean "only_once", default: true, null: false | |
| 344 | 347 | t.datetime "created_at" |
| 345 | 348 | t.datetime "updated_at" |
| 346 | 349 | t.text "error_message" |
| 347 | - t.integer "update_errors", :default => 0 | |
| 350 | + t.integer "update_errors", default: 0 | |
| 348 | 351 | end |
| 349 | 352 | |
| 350 | - add_index "external_feeds", ["blog_id"], :name => "index_external_feeds_on_blog_id" | |
| 351 | - add_index "external_feeds", ["enabled"], :name => "index_external_feeds_on_enabled" | |
| 352 | - add_index "external_feeds", ["fetched_at"], :name => "index_external_feeds_on_fetched_at" | |
| 353 | + add_index "external_feeds", ["blog_id"], name: "index_external_feeds_on_blog_id", using: :btree | |
| 354 | + add_index "external_feeds", ["enabled"], name: "index_external_feeds_on_enabled", using: :btree | |
| 355 | + add_index "external_feeds", ["fetched_at"], name: "index_external_feeds_on_fetched_at", using: :btree | |
| 353 | 356 | |
| 354 | - create_table "favorite_enterprise_people", :force => true do |t| | |
| 357 | + create_table "favorite_enterprise_people", force: :cascade do |t| | |
| 355 | 358 | t.integer "person_id" |
| 356 | 359 | t.integer "enterprise_id" |
| 357 | 360 | t.datetime "created_at" |
| 358 | 361 | t.datetime "updated_at" |
| 359 | 362 | end |
| 360 | 363 | |
| 361 | - add_index "favorite_enterprise_people", ["enterprise_id"], :name => "index_favorite_enterprise_people_on_enterprise_id" | |
| 362 | - add_index "favorite_enterprise_people", ["person_id", "enterprise_id"], :name => "index_favorite_enterprise_people_on_person_id_and_enterprise_id" | |
| 363 | - add_index "favorite_enterprise_people", ["person_id"], :name => "index_favorite_enterprise_people_on_person_id" | |
| 364 | + add_index "favorite_enterprise_people", ["enterprise_id"], name: "index_favorite_enterprise_people_on_enterprise_id", using: :btree | |
| 365 | + add_index "favorite_enterprise_people", ["person_id", "enterprise_id"], name: "index_favorite_enterprise_people_on_person_id_and_enterprise_id", using: :btree | |
| 366 | + add_index "favorite_enterprise_people", ["person_id"], name: "index_favorite_enterprise_people_on_person_id", using: :btree | |
| 364 | 367 | |
| 365 | - create_table "friendships", :force => true do |t| | |
| 368 | + create_table "friendships", force: :cascade do |t| | |
| 366 | 369 | t.integer "person_id" |
| 367 | 370 | t.integer "friend_id" |
| 368 | 371 | t.datetime "created_at" |
| 369 | 372 | t.string "group" |
| 370 | 373 | end |
| 371 | 374 | |
| 372 | - add_index "friendships", ["friend_id"], :name => "index_friendships_on_friend_id" | |
| 373 | - add_index "friendships", ["person_id", "friend_id"], :name => "index_friendships_on_person_id_and_friend_id" | |
| 374 | - add_index "friendships", ["person_id"], :name => "index_friendships_on_person_id" | |
| 375 | + add_index "friendships", ["friend_id"], name: "index_friendships_on_friend_id", using: :btree | |
| 376 | + add_index "friendships", ["person_id", "friend_id"], name: "index_friendships_on_person_id_and_friend_id", using: :btree | |
| 377 | + add_index "friendships", ["person_id"], name: "index_friendships_on_person_id", using: :btree | |
| 375 | 378 | |
| 376 | - create_table "images", :force => true do |t| | |
| 379 | + create_table "images", force: :cascade do |t| | |
| 377 | 380 | t.integer "parent_id" |
| 378 | 381 | t.string "content_type" |
| 379 | 382 | t.string "filename" |
| ... | ... | @@ -381,43 +384,43 @@ ActiveRecord::Schema.define(:version => 20150722042714) do |
| 381 | 384 | t.integer "size" |
| 382 | 385 | t.integer "width" |
| 383 | 386 | t.integer "height" |
| 384 | - t.boolean "thumbnails_processed", :default => false | |
| 385 | - t.string "label", :default => "" | |
| 387 | + t.boolean "thumbnails_processed", default: false | |
| 388 | + t.string "label", default: "" | |
| 386 | 389 | end |
| 387 | 390 | |
| 388 | - add_index "images", ["parent_id"], :name => "index_images_on_parent_id" | |
| 391 | + add_index "images", ["parent_id"], name: "index_images_on_parent_id", using: :btree | |
| 389 | 392 | |
| 390 | - create_table "inputs", :force => true do |t| | |
| 391 | - t.integer "product_id", :null => false | |
| 392 | - t.integer "product_category_id", :null => false | |
| 393 | + create_table "inputs", force: :cascade do |t| | |
| 394 | + t.integer "product_id", null: false | |
| 395 | + t.integer "product_category_id", null: false | |
| 393 | 396 | t.datetime "created_at" |
| 394 | 397 | t.datetime "updated_at" |
| 395 | 398 | t.integer "position" |
| 396 | 399 | t.decimal "price_per_unit" |
| 397 | 400 | t.decimal "amount_used" |
| 398 | - t.boolean "relevant_to_price", :default => true | |
| 399 | - t.boolean "is_from_solidarity_economy", :default => false | |
| 401 | + t.boolean "relevant_to_price", default: true | |
| 402 | + t.boolean "is_from_solidarity_economy", default: false | |
| 400 | 403 | t.integer "unit_id" |
| 401 | 404 | end |
| 402 | 405 | |
| 403 | - add_index "inputs", ["product_category_id"], :name => "index_inputs_on_product_category_id" | |
| 404 | - add_index "inputs", ["product_id"], :name => "index_inputs_on_product_id" | |
| 406 | + add_index "inputs", ["product_category_id"], name: "index_inputs_on_product_category_id", using: :btree | |
| 407 | + add_index "inputs", ["product_id"], name: "index_inputs_on_product_id", using: :btree | |
| 405 | 408 | |
| 406 | - create_table "licenses", :force => true do |t| | |
| 407 | - t.string "name", :null => false | |
| 408 | - t.string "slug", :null => false | |
| 409 | + create_table "licenses", force: :cascade do |t| | |
| 410 | + t.string "name", null: false | |
| 411 | + t.string "slug", null: false | |
| 409 | 412 | t.string "url" |
| 410 | - t.integer "environment_id", :null => false | |
| 413 | + t.integer "environment_id", null: false | |
| 411 | 414 | end |
| 412 | 415 | |
| 413 | - create_table "mailing_sents", :force => true do |t| | |
| 416 | + create_table "mailing_sents", force: :cascade do |t| | |
| 414 | 417 | t.integer "mailing_id" |
| 415 | 418 | t.integer "person_id" |
| 416 | 419 | t.datetime "created_at" |
| 417 | 420 | t.datetime "updated_at" |
| 418 | 421 | end |
| 419 | 422 | |
| 420 | - create_table "mailings", :force => true do |t| | |
| 423 | + create_table "mailings", force: :cascade do |t| | |
| 421 | 424 | t.string "type" |
| 422 | 425 | t.string "subject" |
| 423 | 426 | t.text "body" |
| ... | ... | @@ -429,11 +432,11 @@ ActiveRecord::Schema.define(:version => 20150722042714) do |
| 429 | 432 | t.datetime "updated_at" |
| 430 | 433 | end |
| 431 | 434 | |
| 432 | - create_table "national_region_types", :force => true do |t| | |
| 435 | + create_table "national_region_types", force: :cascade do |t| | |
| 433 | 436 | t.string "name" |
| 434 | 437 | end |
| 435 | 438 | |
| 436 | - create_table "national_regions", :force => true do |t| | |
| 439 | + create_table "national_regions", force: :cascade do |t| | |
| 437 | 440 | t.string "name" |
| 438 | 441 | t.string "national_region_code" |
| 439 | 442 | t.string "parent_national_region_code" |
| ... | ... | @@ -442,18 +445,18 @@ ActiveRecord::Schema.define(:version => 20150722042714) do |
| 442 | 445 | t.integer "national_region_type_id" |
| 443 | 446 | end |
| 444 | 447 | |
| 445 | - add_index "national_regions", ["name"], :name => "name_index" | |
| 446 | - add_index "national_regions", ["national_region_code"], :name => "code_index" | |
| 448 | + add_index "national_regions", ["name"], name: "name_index", using: :btree | |
| 449 | + add_index "national_regions", ["national_region_code"], name: "code_index", using: :btree | |
| 447 | 450 | |
| 448 | - create_table "price_details", :force => true do |t| | |
| 449 | - t.decimal "price", :default => 0.0 | |
| 451 | + create_table "price_details", force: :cascade do |t| | |
| 452 | + t.decimal "price", default: 0.0 | |
| 450 | 453 | t.integer "product_id" |
| 451 | 454 | t.integer "production_cost_id" |
| 452 | 455 | t.datetime "created_at" |
| 453 | 456 | t.datetime "updated_at" |
| 454 | 457 | end |
| 455 | 458 | |
| 456 | - create_table "product_qualifiers", :force => true do |t| | |
| 459 | + create_table "product_qualifiers", force: :cascade do |t| | |
| 457 | 460 | t.integer "product_id" |
| 458 | 461 | t.integer "qualifier_id" |
| 459 | 462 | t.integer "certifier_id" |
| ... | ... | @@ -461,11 +464,11 @@ ActiveRecord::Schema.define(:version => 20150722042714) do |
| 461 | 464 | t.datetime "updated_at" |
| 462 | 465 | end |
| 463 | 466 | |
| 464 | - add_index "product_qualifiers", ["certifier_id"], :name => "index_product_qualifiers_on_certifier_id" | |
| 465 | - add_index "product_qualifiers", ["product_id"], :name => "index_product_qualifiers_on_product_id" | |
| 466 | - add_index "product_qualifiers", ["qualifier_id"], :name => "index_product_qualifiers_on_qualifier_id" | |
| 467 | + add_index "product_qualifiers", ["certifier_id"], name: "index_product_qualifiers_on_certifier_id", using: :btree | |
| 468 | + add_index "product_qualifiers", ["product_id"], name: "index_product_qualifiers_on_product_id", using: :btree | |
| 469 | + add_index "product_qualifiers", ["qualifier_id"], name: "index_product_qualifiers_on_qualifier_id", using: :btree | |
| 467 | 470 | |
| 468 | - create_table "production_costs", :force => true do |t| | |
| 471 | + create_table "production_costs", force: :cascade do |t| | |
| 469 | 472 | t.string "name" |
| 470 | 473 | t.integer "owner_id" |
| 471 | 474 | t.string "owner_type" |
| ... | ... | @@ -473,7 +476,7 @@ ActiveRecord::Schema.define(:version => 20150722042714) do |
| 473 | 476 | t.datetime "updated_at" |
| 474 | 477 | end |
| 475 | 478 | |
| 476 | - create_table "products", :force => true do |t| | |
| 479 | + create_table "products", force: :cascade do |t| | |
| 477 | 480 | t.integer "profile_id" |
| 478 | 481 | t.integer "product_category_id" |
| 479 | 482 | t.string "name" |
| ... | ... | @@ -482,52 +485,52 @@ ActiveRecord::Schema.define(:version => 20150722042714) do |
| 482 | 485 | t.datetime "created_at" |
| 483 | 486 | t.datetime "updated_at" |
| 484 | 487 | t.decimal "discount" |
| 485 | - t.boolean "available", :default => true | |
| 486 | - t.boolean "highlighted", :default => false | |
| 488 | + t.boolean "available", default: true | |
| 489 | + t.boolean "highlighted", default: false | |
| 487 | 490 | t.integer "unit_id" |
| 488 | 491 | t.integer "image_id" |
| 489 | 492 | t.string "type" |
| 490 | 493 | t.text "data" |
| 491 | - t.boolean "archived", :default => false | |
| 494 | + t.boolean "archived", default: false | |
| 492 | 495 | end |
| 493 | 496 | |
| 494 | - add_index "products", ["created_at"], :name => "index_products_on_created_at" | |
| 495 | - add_index "products", ["product_category_id"], :name => "index_products_on_product_category_id" | |
| 496 | - add_index "products", ["profile_id"], :name => "index_products_on_profile_id" | |
| 497 | + add_index "products", ["created_at"], name: "index_products_on_created_at", using: :btree | |
| 498 | + add_index "products", ["product_category_id"], name: "index_products_on_product_category_id", using: :btree | |
| 499 | + add_index "products", ["profile_id"], name: "index_products_on_profile_id", using: :btree | |
| 497 | 500 | |
| 498 | - create_table "profile_activities", :force => true do |t| | |
| 501 | + create_table "profile_activities", force: :cascade do |t| | |
| 499 | 502 | t.integer "profile_id" |
| 500 | 503 | t.integer "activity_id" |
| 501 | 504 | t.string "activity_type" |
| 502 | - t.datetime "created_at", :null => false | |
| 503 | - t.datetime "updated_at", :null => false | |
| 505 | + t.datetime "created_at", null: false | |
| 506 | + t.datetime "updated_at", null: false | |
| 504 | 507 | end |
| 505 | 508 | |
| 506 | - add_index "profile_activities", ["activity_id", "activity_type"], :name => "index_profile_activities_on_activity_id_and_activity_type" | |
| 507 | - add_index "profile_activities", ["activity_type"], :name => "index_profile_activities_on_activity_type" | |
| 508 | - add_index "profile_activities", ["profile_id"], :name => "index_profile_activities_on_profile_id" | |
| 509 | + add_index "profile_activities", ["activity_id", "activity_type"], name: "index_profile_activities_on_activity_id_and_activity_type", using: :btree | |
| 510 | + add_index "profile_activities", ["activity_type"], name: "index_profile_activities_on_activity_type", using: :btree | |
| 511 | + add_index "profile_activities", ["profile_id"], name: "index_profile_activities_on_profile_id", using: :btree | |
| 509 | 512 | |
| 510 | - create_table "profile_suggestions", :force => true do |t| | |
| 513 | + create_table "profile_suggestions", force: :cascade do |t| | |
| 511 | 514 | t.integer "person_id" |
| 512 | 515 | t.integer "suggestion_id" |
| 513 | 516 | t.string "suggestion_type" |
| 514 | 517 | t.text "categories" |
| 515 | - t.boolean "enabled", :default => true | |
| 516 | - t.float "score", :default => 0.0 | |
| 517 | - t.datetime "created_at", :null => false | |
| 518 | - t.datetime "updated_at", :null => false | |
| 518 | + t.boolean "enabled", default: true | |
| 519 | + t.float "score", default: 0.0 | |
| 520 | + t.datetime "created_at", null: false | |
| 521 | + t.datetime "updated_at", null: false | |
| 519 | 522 | end |
| 520 | 523 | |
| 521 | - add_index "profile_suggestions", ["person_id"], :name => "index_profile_suggestions_on_person_id" | |
| 522 | - add_index "profile_suggestions", ["score"], :name => "index_profile_suggestions_on_score" | |
| 523 | - add_index "profile_suggestions", ["suggestion_id"], :name => "index_profile_suggestions_on_suggestion_id" | |
| 524 | + add_index "profile_suggestions", ["person_id"], name: "index_profile_suggestions_on_person_id", using: :btree | |
| 525 | + add_index "profile_suggestions", ["score"], name: "index_profile_suggestions_on_score", using: :btree | |
| 526 | + add_index "profile_suggestions", ["suggestion_id"], name: "index_profile_suggestions_on_suggestion_id", using: :btree | |
| 524 | 527 | |
| 525 | - create_table "profiles", :force => true do |t| | |
| 528 | + create_table "profiles", force: :cascade do |t| | |
| 526 | 529 | t.string "name" |
| 527 | 530 | t.string "type" |
| 528 | 531 | t.string "identifier" |
| 529 | 532 | t.integer "environment_id" |
| 530 | - t.boolean "active", :default => true | |
| 533 | + t.boolean "active", default: true | |
| 531 | 534 | t.string "address" |
| 532 | 535 | t.string "contact_phone" |
| 533 | 536 | t.integer "home_page_id" |
| ... | ... | @@ -538,67 +541,67 @@ ActiveRecord::Schema.define(:version => 20150722042714) do |
| 538 | 541 | t.float "lat" |
| 539 | 542 | t.float "lng" |
| 540 | 543 | t.integer "geocode_precision" |
| 541 | - t.boolean "enabled", :default => true | |
| 542 | - t.string "nickname", :limit => 16 | |
| 544 | + t.boolean "enabled", default: true | |
| 545 | + t.string "nickname", limit: 16 | |
| 543 | 546 | t.text "custom_header" |
| 544 | 547 | t.text "custom_footer" |
| 545 | 548 | t.string "theme" |
| 546 | - t.boolean "public_profile", :default => true | |
| 549 | + t.boolean "public_profile", default: true | |
| 547 | 550 | t.date "birth_date" |
| 548 | 551 | t.integer "preferred_domain_id" |
| 549 | 552 | t.datetime "updated_at" |
| 550 | - t.boolean "visible", :default => true | |
| 553 | + t.boolean "visible", default: true | |
| 551 | 554 | t.integer "image_id" |
| 552 | - t.boolean "validated", :default => true | |
| 555 | + t.boolean "validated", default: true | |
| 553 | 556 | t.string "cnpj" |
| 554 | 557 | t.string "national_region_code" |
| 555 | - t.boolean "is_template", :default => false | |
| 558 | + t.boolean "is_template", default: false | |
| 556 | 559 | t.integer "template_id" |
| 557 | 560 | t.string "redirection_after_login" |
| 558 | - t.integer "friends_count", :default => 0, :null => false | |
| 559 | - t.integer "members_count", :default => 0, :null => false | |
| 560 | - t.integer "activities_count", :default => 0, :null => false | |
| 561 | + t.integer "friends_count", default: 0, null: false | |
| 562 | + t.integer "members_count", default: 0, null: false | |
| 563 | + t.integer "activities_count", default: 0, null: false | |
| 561 | 564 | t.string "personal_website" |
| 562 | 565 | t.string "jabber_id" |
| 563 | 566 | t.integer "welcome_page_id" |
| 564 | - t.boolean "allow_members_to_invite", :default => true | |
| 565 | - t.boolean "invite_friends_only", :default => false | |
| 566 | - t.boolean "secret", :default => false | |
| 567 | - end | |
| 568 | - | |
| 569 | - add_index "profiles", ["activities_count"], :name => "index_profiles_on_activities_count" | |
| 570 | - add_index "profiles", ["created_at"], :name => "index_profiles_on_created_at" | |
| 571 | - add_index "profiles", ["environment_id"], :name => "index_profiles_on_environment_id" | |
| 572 | - add_index "profiles", ["friends_count"], :name => "index_profiles_on_friends_count" | |
| 573 | - add_index "profiles", ["identifier"], :name => "index_profiles_on_identifier" | |
| 574 | - add_index "profiles", ["members_count"], :name => "index_profiles_on_members_count" | |
| 575 | - add_index "profiles", ["region_id"], :name => "index_profiles_on_region_id" | |
| 576 | - add_index "profiles", ["user_id", "type"], :name => "index_profiles_on_user_id_and_type" | |
| 577 | - add_index "profiles", ["user_id"], :name => "index_profiles_on_user_id" | |
| 578 | - | |
| 579 | - create_table "qualifier_certifiers", :force => true do |t| | |
| 567 | + t.boolean "allow_members_to_invite", default: true | |
| 568 | + t.boolean "invite_friends_only", default: false | |
| 569 | + t.boolean "secret", default: false | |
| 570 | + end | |
| 571 | + | |
| 572 | + add_index "profiles", ["activities_count"], name: "index_profiles_on_activities_count", using: :btree | |
| 573 | + add_index "profiles", ["created_at"], name: "index_profiles_on_created_at", using: :btree | |
| 574 | + add_index "profiles", ["environment_id"], name: "index_profiles_on_environment_id", using: :btree | |
| 575 | + add_index "profiles", ["friends_count"], name: "index_profiles_on_friends_count", using: :btree | |
| 576 | + add_index "profiles", ["identifier"], name: "index_profiles_on_identifier", using: :btree | |
| 577 | + add_index "profiles", ["members_count"], name: "index_profiles_on_members_count", using: :btree | |
| 578 | + add_index "profiles", ["region_id"], name: "index_profiles_on_region_id", using: :btree | |
| 579 | + add_index "profiles", ["user_id", "type"], name: "index_profiles_on_user_id_and_type", using: :btree | |
| 580 | + add_index "profiles", ["user_id"], name: "index_profiles_on_user_id", using: :btree | |
| 581 | + | |
| 582 | + create_table "qualifier_certifiers", force: :cascade do |t| | |
| 580 | 583 | t.integer "qualifier_id" |
| 581 | 584 | t.integer "certifier_id" |
| 582 | 585 | end |
| 583 | 586 | |
| 584 | - create_table "qualifiers", :force => true do |t| | |
| 585 | - t.string "name", :null => false | |
| 587 | + create_table "qualifiers", force: :cascade do |t| | |
| 588 | + t.string "name", null: false | |
| 586 | 589 | t.integer "environment_id" |
| 587 | 590 | t.datetime "created_at" |
| 588 | 591 | t.datetime "updated_at" |
| 589 | 592 | end |
| 590 | 593 | |
| 591 | - create_table "refused_join_community", :id => false, :force => true do |t| | |
| 594 | + create_table "refused_join_community", id: false, force: :cascade do |t| | |
| 592 | 595 | t.integer "person_id" |
| 593 | 596 | t.integer "community_id" |
| 594 | 597 | end |
| 595 | 598 | |
| 596 | - create_table "region_validators", :id => false, :force => true do |t| | |
| 599 | + create_table "region_validators", id: false, force: :cascade do |t| | |
| 597 | 600 | t.integer "region_id" |
| 598 | 601 | t.integer "organization_id" |
| 599 | 602 | end |
| 600 | 603 | |
| 601 | - create_table "reported_images", :force => true do |t| | |
| 604 | + create_table "reported_images", force: :cascade do |t| | |
| 602 | 605 | t.integer "size" |
| 603 | 606 | t.string "content_type" |
| 604 | 607 | t.string "filename" |
| ... | ... | @@ -607,25 +610,25 @@ ActiveRecord::Schema.define(:version => 20150722042714) do |
| 607 | 610 | t.integer "abuse_report_id" |
| 608 | 611 | end |
| 609 | 612 | |
| 610 | - create_table "role_assignments", :force => true do |t| | |
| 611 | - t.integer "accessor_id", :null => false | |
| 613 | + create_table "role_assignments", force: :cascade do |t| | |
| 614 | + t.integer "accessor_id", null: false | |
| 612 | 615 | t.string "accessor_type" |
| 613 | 616 | t.integer "resource_id" |
| 614 | 617 | t.string "resource_type" |
| 615 | - t.integer "role_id", :null => false | |
| 618 | + t.integer "role_id", null: false | |
| 616 | 619 | t.boolean "is_global" |
| 617 | 620 | end |
| 618 | 621 | |
| 619 | - create_table "roles", :force => true do |t| | |
| 622 | + create_table "roles", force: :cascade do |t| | |
| 620 | 623 | t.string "name" |
| 621 | 624 | t.string "key" |
| 622 | - t.boolean "system", :default => false | |
| 625 | + t.boolean "system", default: false | |
| 623 | 626 | t.text "permissions" |
| 624 | 627 | t.integer "environment_id" |
| 625 | 628 | t.integer "profile_id" |
| 626 | 629 | end |
| 627 | 630 | |
| 628 | - create_table "scraps", :force => true do |t| | |
| 631 | + create_table "scraps", force: :cascade do |t| | |
| 629 | 632 | t.text "content" |
| 630 | 633 | t.integer "sender_id" |
| 631 | 634 | t.integer "receiver_id" |
| ... | ... | @@ -635,104 +638,104 @@ ActiveRecord::Schema.define(:version => 20150722042714) do |
| 635 | 638 | t.integer "context_id" |
| 636 | 639 | end |
| 637 | 640 | |
| 638 | - create_table "search_term_occurrences", :force => true do |t| | |
| 641 | + create_table "search_term_occurrences", force: :cascade do |t| | |
| 639 | 642 | t.integer "search_term_id" |
| 640 | 643 | t.datetime "created_at" |
| 641 | - t.integer "total", :default => 0 | |
| 642 | - t.integer "indexed", :default => 0 | |
| 644 | + t.integer "total", default: 0 | |
| 645 | + t.integer "indexed", default: 0 | |
| 643 | 646 | end |
| 644 | 647 | |
| 645 | - add_index "search_term_occurrences", ["created_at"], :name => "index_search_term_occurrences_on_created_at" | |
| 648 | + add_index "search_term_occurrences", ["created_at"], name: "index_search_term_occurrences_on_created_at", using: :btree | |
| 646 | 649 | |
| 647 | - create_table "search_terms", :force => true do |t| | |
| 650 | + create_table "search_terms", force: :cascade do |t| | |
| 648 | 651 | t.string "term" |
| 649 | 652 | t.integer "context_id" |
| 650 | 653 | t.string "context_type" |
| 651 | - t.string "asset", :default => "all" | |
| 652 | - t.float "score", :default => 0.0 | |
| 653 | - t.float "relevance_score", :default => 0.0 | |
| 654 | - t.float "occurrence_score", :default => 0.0 | |
| 654 | + t.string "asset", default: "all" | |
| 655 | + t.float "score", default: 0.0 | |
| 656 | + t.float "relevance_score", default: 0.0 | |
| 657 | + t.float "occurrence_score", default: 0.0 | |
| 655 | 658 | end |
| 656 | 659 | |
| 657 | - add_index "search_terms", ["asset"], :name => "index_search_terms_on_asset" | |
| 658 | - add_index "search_terms", ["occurrence_score"], :name => "index_search_terms_on_occurrence_score" | |
| 659 | - add_index "search_terms", ["relevance_score"], :name => "index_search_terms_on_relevance_score" | |
| 660 | - add_index "search_terms", ["score"], :name => "index_search_terms_on_score" | |
| 661 | - add_index "search_terms", ["term"], :name => "index_search_terms_on_term" | |
| 660 | + add_index "search_terms", ["asset"], name: "index_search_terms_on_asset", using: :btree | |
| 661 | + add_index "search_terms", ["occurrence_score"], name: "index_search_terms_on_occurrence_score", using: :btree | |
| 662 | + add_index "search_terms", ["relevance_score"], name: "index_search_terms_on_relevance_score", using: :btree | |
| 663 | + add_index "search_terms", ["score"], name: "index_search_terms_on_score", using: :btree | |
| 664 | + add_index "search_terms", ["term"], name: "index_search_terms_on_term", using: :btree | |
| 662 | 665 | |
| 663 | - create_table "sessions", :force => true do |t| | |
| 664 | - t.string "session_id", :null => false | |
| 666 | + create_table "sessions", force: :cascade do |t| | |
| 667 | + t.string "session_id", null: false | |
| 665 | 668 | t.text "data" |
| 666 | 669 | t.datetime "created_at" |
| 667 | 670 | t.datetime "updated_at" |
| 668 | 671 | t.integer "user_id" |
| 669 | 672 | end |
| 670 | 673 | |
| 671 | - add_index "sessions", ["session_id"], :name => "index_sessions_on_session_id" | |
| 672 | - add_index "sessions", ["updated_at"], :name => "index_sessions_on_updated_at" | |
| 673 | - add_index "sessions", ["user_id"], :name => "index_sessions_on_user_id" | |
| 674 | + add_index "sessions", ["session_id"], name: "index_sessions_on_session_id", using: :btree | |
| 675 | + add_index "sessions", ["updated_at"], name: "index_sessions_on_updated_at", using: :btree | |
| 676 | + add_index "sessions", ["user_id"], name: "index_sessions_on_user_id", using: :btree | |
| 674 | 677 | |
| 675 | - create_table "suggestion_connections", :force => true do |t| | |
| 676 | - t.integer "suggestion_id", :null => false | |
| 677 | - t.integer "connection_id", :null => false | |
| 678 | - t.string "connection_type", :null => false | |
| 678 | + create_table "suggestion_connections", force: :cascade do |t| | |
| 679 | + t.integer "suggestion_id", null: false | |
| 680 | + t.integer "connection_id", null: false | |
| 681 | + t.string "connection_type", null: false | |
| 679 | 682 | end |
| 680 | 683 | |
| 681 | - create_table "taggings", :force => true do |t| | |
| 684 | + create_table "taggings", force: :cascade do |t| | |
| 682 | 685 | t.integer "tag_id" |
| 683 | 686 | t.integer "taggable_id" |
| 684 | 687 | t.string "taggable_type" |
| 685 | 688 | t.datetime "created_at" |
| 686 | 689 | t.integer "tagger_id" |
| 687 | 690 | t.string "tagger_type" |
| 688 | - t.string "context", :limit => 128 | |
| 691 | + t.string "context", limit: 128 | |
| 689 | 692 | end |
| 690 | 693 | |
| 691 | - add_index "taggings", ["tag_id", "taggable_id", "taggable_type", "context", "tagger_id", "tagger_type"], :name => "taggings_idx", :unique => true | |
| 692 | - add_index "taggings", ["taggable_id", "taggable_type", "context"], :name => "index_taggings_on_taggable_id_and_taggable_type_and_context" | |
| 693 | - add_index "taggings", ["taggable_id", "taggable_type"], :name => "index_taggings_on_taggable_id_and_taggable_type" | |
| 694 | + add_index "taggings", ["tag_id", "taggable_id", "taggable_type", "context", "tagger_id", "tagger_type"], name: "taggings_idx", unique: true, using: :btree | |
| 695 | + add_index "taggings", ["taggable_id", "taggable_type", "context"], name: "index_taggings_on_taggable_id_and_taggable_type_and_context", using: :btree | |
| 696 | + add_index "taggings", ["taggable_id", "taggable_type"], name: "index_taggings_on_taggable_id_and_taggable_type", using: :btree | |
| 694 | 697 | |
| 695 | - create_table "tags", :force => true do |t| | |
| 698 | + create_table "tags", force: :cascade do |t| | |
| 696 | 699 | t.string "name" |
| 697 | 700 | t.integer "parent_id" |
| 698 | - t.boolean "pending", :default => false | |
| 699 | - t.integer "taggings_count", :default => 0 | |
| 701 | + t.boolean "pending", default: false | |
| 702 | + t.integer "taggings_count", default: 0 | |
| 700 | 703 | end |
| 701 | 704 | |
| 702 | - add_index "tags", ["name"], :name => "index_tags_on_name", :unique => true | |
| 703 | - add_index "tags", ["parent_id"], :name => "index_tags_on_parent_id" | |
| 705 | + add_index "tags", ["name"], name: "index_tags_on_name", unique: true, using: :btree | |
| 706 | + add_index "tags", ["parent_id"], name: "index_tags_on_parent_id", using: :btree | |
| 704 | 707 | |
| 705 | - create_table "tasks", :force => true do |t| | |
| 708 | + create_table "tasks", force: :cascade do |t| | |
| 706 | 709 | t.text "data" |
| 707 | 710 | t.integer "status" |
| 708 | 711 | t.date "end_date" |
| 709 | 712 | t.integer "requestor_id" |
| 710 | 713 | t.integer "target_id" |
| 711 | - t.string "code", :limit => 40 | |
| 714 | + t.string "code", limit: 40 | |
| 712 | 715 | t.string "type" |
| 713 | 716 | t.datetime "created_at" |
| 714 | 717 | t.string "target_type" |
| 715 | 718 | t.integer "image_id" |
| 716 | - t.boolean "spam", :default => false | |
| 719 | + t.boolean "spam", default: false | |
| 717 | 720 | t.integer "responsible_id" |
| 718 | 721 | t.integer "closed_by_id" |
| 719 | 722 | end |
| 720 | 723 | |
| 721 | - add_index "tasks", ["requestor_id"], :name => "index_tasks_on_requestor_id" | |
| 722 | - add_index "tasks", ["spam"], :name => "index_tasks_on_spam" | |
| 723 | - add_index "tasks", ["status"], :name => "index_tasks_on_status" | |
| 724 | - add_index "tasks", ["target_id", "target_type"], :name => "index_tasks_on_target_id_and_target_type" | |
| 725 | - add_index "tasks", ["target_id"], :name => "index_tasks_on_target_id" | |
| 726 | - add_index "tasks", ["target_type"], :name => "index_tasks_on_target_type" | |
| 724 | + add_index "tasks", ["requestor_id"], name: "index_tasks_on_requestor_id", using: :btree | |
| 725 | + add_index "tasks", ["spam"], name: "index_tasks_on_spam", using: :btree | |
| 726 | + add_index "tasks", ["status"], name: "index_tasks_on_status", using: :btree | |
| 727 | + add_index "tasks", ["target_id", "target_type"], name: "index_tasks_on_target_id_and_target_type", using: :btree | |
| 728 | + add_index "tasks", ["target_id"], name: "index_tasks_on_target_id", using: :btree | |
| 729 | + add_index "tasks", ["target_type"], name: "index_tasks_on_target_type", using: :btree | |
| 727 | 730 | |
| 728 | - create_table "terms_forum_people", :id => false, :force => true do |t| | |
| 731 | + create_table "terms_forum_people", id: false, force: :cascade do |t| | |
| 729 | 732 | t.integer "forum_id" |
| 730 | 733 | t.integer "person_id" |
| 731 | 734 | end |
| 732 | 735 | |
| 733 | - add_index "terms_forum_people", ["forum_id", "person_id"], :name => "index_terms_forum_people_on_forum_id_and_person_id" | |
| 736 | + add_index "terms_forum_people", ["forum_id", "person_id"], name: "index_terms_forum_people_on_forum_id_and_person_id", using: :btree | |
| 734 | 737 | |
| 735 | - create_table "thumbnails", :force => true do |t| | |
| 738 | + create_table "thumbnails", force: :cascade do |t| | |
| 736 | 739 | t.integer "size" |
| 737 | 740 | t.string "content_type" |
| 738 | 741 | t.string "filename" |
| ... | ... | @@ -742,33 +745,33 @@ ActiveRecord::Schema.define(:version => 20150722042714) do |
| 742 | 745 | t.string "thumbnail" |
| 743 | 746 | end |
| 744 | 747 | |
| 745 | - add_index "thumbnails", ["parent_id"], :name => "index_thumbnails_on_parent_id" | |
| 748 | + add_index "thumbnails", ["parent_id"], name: "index_thumbnails_on_parent_id", using: :btree | |
| 746 | 749 | |
| 747 | - create_table "units", :force => true do |t| | |
| 748 | - t.string "singular", :null => false | |
| 749 | - t.string "plural", :null => false | |
| 750 | + create_table "units", force: :cascade do |t| | |
| 751 | + t.string "singular", null: false | |
| 752 | + t.string "plural", null: false | |
| 750 | 753 | t.integer "position" |
| 751 | - t.integer "environment_id", :null => false | |
| 754 | + t.integer "environment_id", null: false | |
| 752 | 755 | end |
| 753 | 756 | |
| 754 | - create_table "users", :force => true do |t| | |
| 757 | + create_table "users", force: :cascade do |t| | |
| 755 | 758 | t.string "login" |
| 756 | 759 | t.string "email" |
| 757 | - t.string "crypted_password", :limit => 40 | |
| 758 | - t.string "salt", :limit => 40 | |
| 760 | + t.string "crypted_password", limit: 40 | |
| 761 | + t.string "salt", limit: 40 | |
| 759 | 762 | t.datetime "created_at" |
| 760 | 763 | t.datetime "updated_at" |
| 761 | 764 | t.string "remember_token" |
| 762 | 765 | t.datetime "remember_token_expires_at" |
| 763 | 766 | t.text "terms_of_use" |
| 764 | - t.string "terms_accepted", :limit => 1 | |
| 767 | + t.string "terms_accepted", limit: 1 | |
| 765 | 768 | t.integer "environment_id" |
| 766 | 769 | t.string "password_type" |
| 767 | - t.boolean "enable_email", :default => false | |
| 768 | - t.string "last_chat_status", :default => "" | |
| 769 | - t.string "chat_status", :default => "" | |
| 770 | + t.boolean "enable_email", default: false | |
| 771 | + t.string "last_chat_status", default: "" | |
| 772 | + t.string "chat_status", default: "" | |
| 770 | 773 | t.datetime "chat_status_at" |
| 771 | - t.string "activation_code", :limit => 40 | |
| 774 | + t.string "activation_code", limit: 40 | |
| 772 | 775 | t.datetime "activated_at" |
| 773 | 776 | t.string "return_to" |
| 774 | 777 | t.datetime "last_login_at" |
| ... | ... | @@ -776,23 +779,23 @@ ActiveRecord::Schema.define(:version => 20150722042714) do |
| 776 | 779 | t.datetime "private_token_generated_at" |
| 777 | 780 | end |
| 778 | 781 | |
| 779 | - create_table "validation_infos", :force => true do |t| | |
| 782 | + create_table "validation_infos", force: :cascade do |t| | |
| 780 | 783 | t.text "validation_methodology" |
| 781 | 784 | t.text "restrictions" |
| 782 | 785 | t.integer "organization_id" |
| 783 | 786 | end |
| 784 | 787 | |
| 785 | - create_table "votes", :force => true do |t| | |
| 786 | - t.integer "vote", :null => false | |
| 787 | - t.integer "voteable_id", :null => false | |
| 788 | - t.string "voteable_type", :null => false | |
| 788 | + create_table "votes", force: :cascade do |t| | |
| 789 | + t.integer "vote", null: false | |
| 790 | + t.integer "voteable_id", null: false | |
| 791 | + t.string "voteable_type", null: false | |
| 789 | 792 | t.integer "voter_id" |
| 790 | 793 | t.string "voter_type" |
| 791 | 794 | t.datetime "created_at" |
| 792 | 795 | t.datetime "updated_at" |
| 793 | 796 | end |
| 794 | 797 | |
| 795 | - add_index "votes", ["voteable_id", "voteable_type"], :name => "fk_voteables" | |
| 796 | - add_index "votes", ["voter_id", "voter_type"], :name => "fk_voters" | |
| 798 | + add_index "votes", ["voteable_id", "voteable_type"], name: "fk_voteables", using: :btree | |
| 799 | + add_index "votes", ["voter_id", "voter_type"], name: "fk_voters", using: :btree | |
| 797 | 800 | |
| 798 | 801 | end | ... | ... |