|
10 | 10 | # |
11 | 11 | # It's strongly recommended that you check this file into your version control system. |
12 | 12 |
|
13 | | -ActiveRecord::Schema.define(version: 20170417185915) do |
| 13 | +ActiveRecord::Schema.define(version: 20170519201648) do |
14 | 14 |
|
15 | 15 | # These are extensions that must be enabled in order to support this database |
16 | 16 | enable_extension "plpgsql" |
|
58 | 58 | end |
59 | 59 |
|
60 | 60 | create_table "categories", force: :cascade do |t| |
61 | | - t.string "name", limit: 255 |
62 | | - t.integer "user_id", null: false |
| 61 | + t.string "name" |
| 62 | + t.integer "user_id", null: false |
63 | 63 | t.integer "parent_id" |
64 | 64 | t.integer "lft" |
65 | 65 | t.integer "rgt" |
66 | 66 | t.integer "depth" |
67 | 67 | t.datetime "created_at" |
68 | 68 | t.datetime "updated_at" |
| 69 | + t.index ["depth"], name: "index_categories_on_depth", using: :btree |
| 70 | + t.index ["lft"], name: "index_categories_on_lft", using: :btree |
| 71 | + t.index ["parent_id"], name: "index_categories_on_parent_id", using: :btree |
| 72 | + t.index ["rgt"], name: "index_categories_on_rgt", using: :btree |
| 73 | + t.index ["user_id"], name: "index_categories_on_user_id", using: :btree |
69 | 74 | end |
70 | 75 |
|
71 | 76 | create_table "categories_posts", id: false, force: :cascade do |t| |
|
208 | 213 | end |
209 | 214 |
|
210 | 215 | create_table "media", force: :cascade do |t| |
211 | | - t.string "name", limit: 255 |
| 216 | + t.string "name" |
212 | 217 | t.integer "user_id" |
213 | | - t.string "attachment_file_name", limit: 255 |
214 | | - t.string "attachment_content_type", limit: 255 |
| 218 | + t.string "attachment_file_name" |
| 219 | + t.string "attachment_content_type" |
215 | 220 | t.integer "attachment_file_size" |
216 | 221 | t.datetime "attachment_updated_at" |
217 | | - t.string "dimensions", limit: 255 |
| 222 | + t.string "dimensions" |
218 | 223 | t.text "description" |
219 | | - t.string "alt", limit: 255 |
| 224 | + t.string "alt" |
220 | 225 | t.boolean "active" |
221 | 226 | t.datetime "deactive_at" |
222 | 227 | t.datetime "created_at" |
223 | 228 | t.datetime "updated_at" |
224 | | - t.string "digest", limit: 255 |
| 229 | + t.string "digest" |
225 | 230 | t.datetime "deleted_at" |
226 | 231 | t.hstore "meta" |
227 | | - t.string "type", limit: 255, default: "Media", null: false |
| 232 | + t.string "type", default: "Media", null: false |
| 233 | + t.index ["name"], name: "index_media_on_name", using: :btree |
228 | 234 | t.index ["user_id"], name: "index_media_on_user_id", using: :btree |
229 | 235 | end |
230 | 236 |
|
|
234 | 240 | end |
235 | 241 |
|
236 | 242 | create_table "oauth_access_grants", force: :cascade do |t| |
237 | | - t.integer "resource_owner_id", null: false |
238 | | - t.integer "application_id", null: false |
239 | | - t.string "token", limit: 255, null: false |
240 | | - t.integer "expires_in", null: false |
241 | | - t.text "redirect_uri", null: false |
242 | | - t.datetime "created_at", null: false |
| 243 | + t.integer "resource_owner_id", null: false |
| 244 | + t.integer "application_id", null: false |
| 245 | + t.string "token", null: false |
| 246 | + t.integer "expires_in", null: false |
| 247 | + t.text "redirect_uri", null: false |
| 248 | + t.datetime "created_at", null: false |
243 | 249 | t.datetime "revoked_at" |
244 | | - t.string "scopes", limit: 255 |
| 250 | + t.string "scopes" |
245 | 251 | t.index ["token"], name: "index_oauth_access_grants_on_token", unique: true, using: :btree |
246 | 252 | end |
247 | 253 |
|
248 | 254 | create_table "oauth_access_tokens", force: :cascade do |t| |
249 | 255 | t.integer "resource_owner_id" |
250 | 256 | t.integer "application_id" |
251 | | - t.string "token", limit: 255, null: false |
252 | | - t.string "refresh_token", limit: 255 |
| 257 | + t.string "token", null: false |
| 258 | + t.string "refresh_token" |
253 | 259 | t.integer "expires_in" |
254 | 260 | t.datetime "revoked_at" |
255 | | - t.datetime "created_at", null: false |
256 | | - t.string "scopes", limit: 255 |
| 261 | + t.datetime "created_at", null: false |
| 262 | + t.string "scopes" |
257 | 263 | t.index ["refresh_token"], name: "index_oauth_access_tokens_on_refresh_token", unique: true, using: :btree |
258 | 264 | t.index ["resource_owner_id"], name: "index_oauth_access_tokens_on_resource_owner_id", using: :btree |
259 | 265 | t.index ["token"], name: "index_oauth_access_tokens_on_token", unique: true, using: :btree |
260 | 266 | end |
261 | 267 |
|
262 | 268 | create_table "oauth_applications", force: :cascade do |t| |
263 | | - t.string "name", limit: 255, null: false |
264 | | - t.string "uid", limit: 255, null: false |
265 | | - t.string "secret", limit: 255, null: false |
266 | | - t.text "redirect_uri", null: false |
| 269 | + t.string "name", null: false |
| 270 | + t.string "uid", null: false |
| 271 | + t.string "secret", null: false |
| 272 | + t.text "redirect_uri", null: false |
267 | 273 | t.datetime "created_at" |
268 | 274 | t.datetime "updated_at" |
269 | 275 | t.integer "owner_id" |
270 | | - t.string "owner_type", limit: 255 |
271 | | - t.string "scopes", default: "", null: false |
| 276 | + t.string "owner_type" |
| 277 | + t.string "scopes", default: "", null: false |
272 | 278 | t.index ["owner_id", "owner_type"], name: "index_oauth_applications_on_owner_id_and_owner_type", using: :btree |
273 | 279 | t.index ["uid"], name: "index_oauth_applications_on_uid", unique: true, using: :btree |
274 | 280 | end |
275 | 281 |
|
276 | 282 | create_table "onet_occupations", force: :cascade do |t| |
277 | | - t.string "soc", limit: 255 |
278 | | - t.string "title", limit: 255 |
| 283 | + t.string "soc" |
| 284 | + t.string "title" |
279 | 285 | t.text "description" |
280 | 286 | t.datetime "created_at" |
281 | 287 | t.datetime "updated_at" |
|
295 | 301 | end |
296 | 302 |
|
297 | 303 | create_table "posts", force: :cascade do |t| |
298 | | - t.integer "user_id", null: false |
299 | | - t.string "title", limit: 255 |
| 304 | + t.integer "user_id", null: false |
| 305 | + t.string "title" |
300 | 306 | t.datetime "published_at" |
301 | 307 | t.datetime "expired_at" |
302 | 308 | t.datetime "deleted_at" |
303 | | - t.boolean "draft", default: true, null: false |
304 | | - t.integer "comment_count", default: 0, null: false |
| 309 | + t.boolean "draft", default: true, null: false |
| 310 | + t.integer "comment_count", default: 0, null: false |
305 | 311 | t.text "body" |
306 | 312 | t.datetime "created_at" |
307 | 313 | t.datetime "updated_at" |
308 | | - t.string "short_description", limit: 255 |
309 | | - t.integer "job_phase", null: false |
310 | | - t.integer "display", null: false |
| 314 | + t.string "short_description" |
| 315 | + t.integer "job_phase", null: false |
| 316 | + t.integer "display", null: false |
311 | 317 | t.text "notes" |
312 | | - t.string "copyright_owner", limit: 255 |
313 | | - t.string "seo_title", limit: 255 |
314 | | - t.string "seo_description", limit: 255 |
315 | | - t.string "seo_preview", limit: 255 |
316 | | - t.string "custom_author", limit: 255 |
317 | | - t.string "slug", null: false |
| 318 | + t.string "copyright_owner" |
| 319 | + t.string "seo_title" |
| 320 | + t.string "seo_description" |
| 321 | + t.string "seo_preview" |
| 322 | + t.string "custom_author" |
| 323 | + t.string "slug", null: false |
318 | 324 | t.integer "featured_media_id" |
319 | 325 | t.integer "primary_industry_id" |
320 | 326 | t.integer "primary_category_id" |
321 | 327 | t.integer "tile_media_id" |
322 | 328 | t.hstore "meta" |
323 | | - t.string "type", default: "Post", null: false |
| 329 | + t.string "type", default: "Post", null: false |
324 | 330 | t.integer "author_id" |
325 | | - t.boolean "is_wysiwyg", default: true |
326 | | - t.boolean "noindex", default: false |
327 | | - t.boolean "nofollow", default: false |
328 | | - t.boolean "nosnippet", default: false |
329 | | - t.boolean "noodp", default: false |
330 | | - t.boolean "noarchive", default: false |
331 | | - t.boolean "noimageindex", default: false |
332 | | - t.boolean "is_sticky", default: false |
| 331 | + t.boolean "is_wysiwyg", default: true |
| 332 | + t.boolean "noindex", default: false |
| 333 | + t.boolean "nofollow", default: false |
| 334 | + t.boolean "nosnippet", default: false |
| 335 | + t.boolean "noodp", default: false |
| 336 | + t.boolean "noarchive", default: false |
| 337 | + t.boolean "noimageindex", default: false |
| 338 | + t.boolean "is_sticky", default: false |
333 | 339 | t.index ["author_id"], name: "index_posts_on_author_id", using: :btree |
334 | 340 | t.index ["slug"], name: "index_posts_on_slug", using: :btree |
335 | 341 | t.index ["type"], name: "index_posts_on_type", using: :btree |
| 342 | + t.index ["user_id"], name: "index_posts_on_user_id", using: :btree |
336 | 343 | end |
337 | 344 |
|
338 | 345 | create_table "role_permissions", force: :cascade do |t| |
|
344 | 351 |
|
345 | 352 | create_table "roles", force: :cascade do |t| |
346 | 353 | t.string "name" |
347 | | - t.datetime "created_at" |
348 | | - t.datetime "updated_at" |
349 | 354 | t.string "resource_type" |
350 | | - t.string "resource_id" |
| 355 | + t.integer "resource_id" |
| 356 | + t.datetime "created_at", null: false |
| 357 | + t.datetime "updated_at", null: false |
| 358 | + t.index ["name", "resource_type", "resource_id"], name: "index_roles_on_name_and_resource_type_and_resource_id", using: :btree |
351 | 359 | t.index ["name"], name: "index_roles_on_name", using: :btree |
352 | 360 | end |
353 | 361 |
|
|
363 | 371 |
|
364 | 372 | create_table "taggings", force: :cascade do |t| |
365 | 373 | t.integer "tag_id" |
| 374 | + t.string "taggable_type" |
366 | 375 | t.integer "taggable_id" |
367 | | - t.string "taggable_type", limit: 255 |
| 376 | + t.string "tagger_type" |
368 | 377 | t.integer "tagger_id" |
369 | | - t.string "tagger_type", limit: 255 |
370 | 378 | t.string "context", limit: 128 |
371 | 379 | t.datetime "created_at" |
372 | 380 | t.index ["context"], name: "index_taggings_on_context", using: :btree |
|
381 | 389 | end |
382 | 390 |
|
383 | 391 | create_table "tags", force: :cascade do |t| |
384 | | - t.string "name", limit: 255 |
385 | | - t.integer "taggings_count", default: 0 |
386 | | - t.integer "tenant_id", default: 1 |
| 392 | + t.string "name" |
| 393 | + t.integer "taggings_count", default: 0 |
387 | 394 | t.index ["name"], name: "index_tags_on_name", unique: true, using: :btree |
388 | 395 | end |
389 | 396 |
|
|
398 | 405 | t.string "contact_email", limit: 200 |
399 | 406 | t.string "contact_phone", limit: 20 |
400 | 407 | t.datetime "deleted_at" |
401 | | - t.string "contract", limit: 255 |
402 | | - t.string "did", limit: 255 |
| 408 | + t.string "contract" |
| 409 | + t.string "did" |
403 | 410 | t.datetime "active_at" |
404 | 411 | t.datetime "deactive_at" |
405 | 412 | t.integer "owner_id" |
406 | 413 | t.datetime "created_at" |
407 | 414 | t.datetime "updated_at" |
| 415 | + t.index ["did"], name: "index_tenants_on_did", using: :btree |
| 416 | + t.index ["owner_id"], name: "index_tenants_on_owner_id", using: :btree |
408 | 417 | t.index ["parent_id"], name: "index_tenants_on_parent_id", using: :btree |
409 | 418 | end |
410 | 419 |
|
411 | 420 | create_table "users", force: :cascade do |t| |
412 | | - t.string "email", limit: 255, default: "", null: false |
| 421 | + t.string "email", default: "", null: false |
413 | 422 | t.datetime "created_at" |
414 | 423 | t.datetime "updated_at" |
415 | | - t.integer "tenant_id", null: false |
416 | | - t.string "encrypted_password", limit: 255, default: "", null: false |
417 | | - t.string "reset_password_token", limit: 255 |
| 424 | + t.integer "tenant_id", null: false |
| 425 | + t.string "encrypted_password", default: "", null: false |
| 426 | + t.string "reset_password_token" |
418 | 427 | t.datetime "reset_password_sent_at" |
419 | 428 | t.datetime "remember_created_at" |
420 | | - t.integer "sign_in_count", default: 0, null: false |
| 429 | + t.integer "sign_in_count", default: 0, null: false |
421 | 430 | t.datetime "current_sign_in_at" |
422 | 431 | t.datetime "last_sign_in_at" |
423 | | - t.string "current_sign_in_ip", limit: 255 |
424 | | - t.string "last_sign_in_ip", limit: 255 |
425 | | - t.string "firstname", limit: 255, null: false |
426 | | - t.string "lastname", limit: 255 |
427 | | - t.string "locale", limit: 30, default: "en_US", null: false |
428 | | - t.string "timezone", limit: 30, default: "EST", null: false |
429 | | - t.boolean "admin", default: false, null: false |
| 432 | + t.string "current_sign_in_ip" |
| 433 | + t.string "last_sign_in_ip" |
| 434 | + t.string "firstname", null: false |
| 435 | + t.string "lastname" |
| 436 | + t.string "locale", limit: 30, default: "en_US", null: false |
| 437 | + t.string "timezone", limit: 30, default: "EST", null: false |
| 438 | + t.boolean "admin", default: false, null: false |
430 | 439 | t.index ["email"], name: "index_users_on_email", unique: true, using: :btree |
431 | 440 | t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree |
432 | 441 | t.index ["tenant_id"], name: "index_users_on_tenant_id", using: :btree |
433 | 442 | end |
434 | 443 |
|
435 | 444 | create_table "users_roles", id: false, force: :cascade do |t| |
436 | | - t.integer "user_id" |
437 | | - t.integer "role_id" |
| 445 | + t.integer "user_id" |
| 446 | + t.integer "role_id" |
| 447 | + t.datetime "created_at", null: false |
| 448 | + t.datetime "updated_at", null: false |
438 | 449 | t.index ["user_id", "role_id"], name: "index_users_roles_on_user_id_and_role_id", using: :btree |
439 | 450 | end |
440 | 451 |
|
|
457 | 468 | t.boolean "noodp", default: false |
458 | 469 | t.boolean "noarchive", default: false |
459 | 470 | t.boolean "noimageindex", default: false |
460 | | - t.text "seo_keywords" |
461 | 471 | t.string "dynamic_yield_sku" |
462 | 472 | t.string "dynamic_yield_category" |
463 | 473 | t.jsonb "tables_widget" |
| 474 | + t.jsonb "charts_widget" |
464 | 475 | t.index ["user_id"], name: "index_webpages_on_user_id", using: :btree |
465 | 476 | end |
466 | 477 |
|
|
0 commit comments