|
15 | 15 | # These are extensions that must be enabled in order to support this database
|
16 | 16 | enable_extension "plpgsql"
|
17 | 17 |
|
18 |
| - create_table "categories", force: :cascade do |t| |
19 |
| - t.string "name" |
| 18 | + create_table "categories", id: :serial, force: :cascade do |t| |
| 19 | + t.string "name", limit: 255 |
20 | 20 | t.text "description"
|
21 |
| - t.datetime "created_at", null: false |
22 |
| - t.datetime "updated_at", null: false |
| 21 | + t.datetime "created_at" |
| 22 | + t.datetime "updated_at" |
23 | 23 | end
|
24 | 24 |
|
25 | 25 | create_table "categories_resources", id: false, force: :cascade do |t|
|
26 |
| - t.bigint "resource_id" |
27 |
| - t.bigint "category_id" |
| 26 | + t.integer "resource_id" |
| 27 | + t.integer "category_id" |
28 | 28 | t.index ["category_id"], name: "index_categories_resources_on_category_id"
|
29 | 29 | t.index ["resource_id"], name: "index_categories_resources_on_resource_id"
|
30 | 30 | end
|
31 | 31 |
|
32 |
| - create_table "guides", force: :cascade do |t| |
33 |
| - t.string "title" |
34 |
| - t.string "alias" |
35 |
| - t.string "description" |
| 32 | + create_table "guides", id: :serial, force: :cascade do |t| |
| 33 | + t.string "title", limit: 255 |
| 34 | + t.string "alias", limit: 255 |
| 35 | + t.string "description", limit: 255 |
36 | 36 | t.integer "likes"
|
37 |
| - t.datetime "created_at", null: false |
38 |
| - t.datetime "updated_at", null: false |
| 37 | + t.datetime "created_at" |
| 38 | + t.datetime "updated_at" |
39 | 39 | end
|
40 | 40 |
|
41 | 41 | create_table "guides_steps", id: false, force: :cascade do |t|
|
42 |
| - t.bigint "guide_id" |
43 |
| - t.bigint "step_id" |
| 42 | + t.integer "guide_id" |
| 43 | + t.integer "step_id" |
44 | 44 | t.index ["guide_id"], name: "index_guides_steps_on_guide_id"
|
45 | 45 | t.index ["step_id"], name: "index_guides_steps_on_step_id"
|
46 | 46 | end
|
47 | 47 |
|
48 |
| - create_table "personas", force: :cascade do |t| |
49 |
| - t.string "name" |
50 |
| - t.string "color" |
| 48 | + create_table "personas", id: :serial, force: :cascade do |t| |
| 49 | + t.string "name", limit: 255 |
| 50 | + t.string "color", limit: 255 |
51 | 51 | t.text "description"
|
52 | 52 | t.json "questions"
|
53 |
| - t.datetime "created_at", null: false |
54 |
| - t.datetime "updated_at", null: false |
| 53 | + t.datetime "created_at" |
| 54 | + t.datetime "updated_at" |
55 | 55 | end
|
56 | 56 |
|
57 |
| - create_table "resources", force: :cascade do |t| |
58 |
| - t.string "title" |
59 |
| - t.string "url" |
| 57 | + create_table "resources", id: :serial, force: :cascade do |t| |
| 58 | + t.string "title", limit: 255 |
| 59 | + t.string "url", limit: 255 |
60 | 60 | t.text "description"
|
61 |
| - t.string "source" |
| 61 | + t.string "source", limit: 255 |
62 | 62 | t.datetime "date"
|
63 | 63 | t.boolean "public"
|
64 | 64 | t.integer "likes", default: 0
|
65 |
| - t.datetime "created_at", null: false |
66 |
| - t.datetime "updated_at", null: false |
| 65 | + t.datetime "created_at" |
| 66 | + t.datetime "updated_at" |
67 | 67 | end
|
68 | 68 |
|
69 |
| - create_table "steps", force: :cascade do |t| |
70 |
| - t.string "type" |
| 69 | + create_table "steps", id: :serial, force: :cascade do |t| |
| 70 | + t.string "type", limit: 255 |
71 | 71 | t.text "content"
|
72 |
| - t.string "level" |
| 72 | + t.string "level", limit: 255 |
73 | 73 | t.integer "likes"
|
74 |
| - t.datetime "created_at", null: false |
75 |
| - t.datetime "updated_at", null: false |
| 74 | + t.datetime "created_at" |
| 75 | + t.datetime "updated_at" |
76 | 76 | end
|
77 | 77 |
|
78 |
| - create_table "taggings", force: :cascade do |t| |
79 |
| - t.bigint "tag_id" |
80 |
| - t.string "taggable_type" |
81 |
| - t.bigint "taggable_id" |
82 |
| - t.string "tagger_type" |
83 |
| - t.bigint "tagger_id" |
| 78 | + create_table "taggings", id: :serial, force: :cascade do |t| |
| 79 | + t.integer "tag_id" |
| 80 | + t.integer "taggable_id" |
| 81 | + t.string "taggable_type", limit: 255 |
| 82 | + t.integer "tagger_id" |
| 83 | + t.string "tagger_type", limit: 255 |
84 | 84 | t.string "context", limit: 128
|
85 | 85 | t.datetime "created_at"
|
86 | 86 | t.index ["context"], name: "index_taggings_on_context"
|
|
89 | 89 | t.index ["taggable_id", "taggable_type", "context"], name: "index_taggings_on_taggable_id_and_taggable_type_and_context"
|
90 | 90 | t.index ["taggable_id", "taggable_type", "tagger_id", "context"], name: "taggings_idy"
|
91 | 91 | t.index ["taggable_id"], name: "index_taggings_on_taggable_id"
|
92 |
| - t.index ["taggable_type", "taggable_id"], name: "index_taggings_on_taggable_type_and_taggable_id" |
93 | 92 | t.index ["taggable_type"], name: "index_taggings_on_taggable_type"
|
94 | 93 | t.index ["tagger_id", "tagger_type"], name: "index_taggings_on_tagger_id_and_tagger_type"
|
95 | 94 | t.index ["tagger_id"], name: "index_taggings_on_tagger_id"
|
96 |
| - t.index ["tagger_type", "tagger_id"], name: "index_taggings_on_tagger_type_and_tagger_id" |
97 | 95 | end
|
98 | 96 |
|
99 |
| - create_table "tags", force: :cascade do |t| |
100 |
| - t.string "name" |
| 97 | + create_table "tags", id: :serial, force: :cascade do |t| |
| 98 | + t.string "name", limit: 255 |
101 | 99 | t.integer "taggings_count", default: 0
|
102 | 100 | t.index ["name"], name: "index_tags_on_name", unique: true
|
103 | 101 | end
|
|
0 commit comments