This repository has been archived by the owner on Oct 27, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Schemafile
77 lines (69 loc) · 3.25 KB
/
Schemafile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# -*- mode: ruby -*-
# vi: set ft=ruby :
create_table "_fluent_migrations", id: :binary, limit: 16, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
t.string "name", null: false
t.bigint "batch", null: false
t.datetime "created_at", precision: 6
t.datetime "updated_at", precision: 6
t.index ["name"], name: "eb3ee69e0c062ede0b815d412472c764ccb82e41", unique: true
end
create_table "categories", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
t.string "name", null: false
t.datetime "created_at", precision: 6
t.datetime "updated_at", precision: 6
t.index ["name"], name: "a1a5b9e68740ec999097fe2605652162596aa535", unique: true
end
create_table "images", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
t.string "path", null: false
t.string "alt_description", null: false
t.datetime "created_at", precision: 6
t.datetime "updated_at", precision: 6
t.index ["path"], name: "da215b19a814e58da0ea561d49332e7c52ea18a8", unique: true
end
create_table "post_tag", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
t.bigint "post_id", null: false
t.bigint "tag_id", null: false
t.index ["post_id"], name: "f9ddae060927c9a68aeff4e43b2c9ea889fae6c2"
t.index ["tag_id"], name: "d2802be2fcc376fdd6c516330d8625c760ea110b"
end
create_table "posts", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
t.string "title", limit: 128, null: false
t.string "content", limit: 8192, null: false
t.string "html_content", limit: 8192, null: false
t.string "part_of_content", limit: 150, null: false
t.bigint "category_id"
t.bigint "user_id"
t.boolean "is_static", null: false
t.boolean "is_published", null: false
t.datetime "created_at", precision: 6
t.datetime "updated_at", precision: 6
t.index ["category_id"], name: "9757e84fb27a44b78a1beec5c640708f6097b665"
t.index ["user_id"], name: "83a2c7895c9d68db86de812c7c8cdd24e274310b"
end
create_table "siteinfos", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
t.string "name", null: false
t.string "description", null: false
t.string "theme"
t.datetime "created_at", precision: 6
t.datetime "updated_at", precision: 6
end
create_table "tags", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
t.string "name", null: false
t.datetime "created_at", precision: 6
t.datetime "updated_at", precision: 6
t.index ["name"], name: "18ecb3b1940e3644c369da7d0026da1b7abacce9", unique: true
end
create_table "users", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
t.string "name", null: false
t.string "password", null: false
t.string "api_key", null: false
t.string "api_secret", null: false
t.string "access_token", null: false
t.string "access_token_secret", null: false
t.datetime "created_at", precision: 6
t.datetime "updated_at", precision: 6
end
add_foreign_key "post_tag", "posts", name: "f9ddae060927c9a68aeff4e43b2c9ea889fae6c2", on_delete: :cascade
add_foreign_key "post_tag", "tags", name: "d2802be2fcc376fdd6c516330d8625c760ea110b", on_delete: :cascade
add_foreign_key "posts", "categories", name: "9757e84fb27a44b78a1beec5c640708f6097b665"
add_foreign_key "posts", "users", name: "83a2c7895c9d68db86de812c7c8cdd24e274310b"