-
Notifications
You must be signed in to change notification settings - Fork 4
/
Schemafile
47 lines (43 loc) · 1.92 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
create_table "bundles", force: :cascade do |t|
t.string "service_name", limit: 255, null: false
t.string "host_name", limit: 255, null: false
t.string "database_name", limit: 255, null: false
t.string "color", limit: 255, null: false
t.integer "created_at", null: false
t.integer "updated_at", null: false
end
add_index "bundles", ["service_name", "host_name", "database_name"], name: "bundles_dbname_index", unique: true
create_table "explains", force: :cascade do |t|
t.integer "slow_query_id", limit: 8
t.integer "explain_id", null: false
t.string "select_type", limit: 255, null: false
t.string "table", limit: 255, null: false
t.string "type", limit: 255, null: false
t.string "possible_keys", limit: 255
t.string "key", limit: 255
t.integer "key_len"
t.string "ref", limit: 255
t.integer "rows", limit: 8, null: false
t.text "extra"
t.integer "created_at", null: false
t.integer "updated_at", null: false
end
create_table "slow_queries", force: :cascade do |t|
t.integer "bundle_id", limit: 8
t.integer "datetime"
t.integer "period_per_hour"
t.integer "period_per_day"
t.string "user", limit: 255
t.string "host", limit: 255
t.float "query_time"
t.float "lock_time"
t.integer "rows_sent", limit: 8
t.integer "rows_examined", limit: 8
t.text "sql"
t.string "explain", limit: 255, default: "none", null: false
t.integer "created_at", null: false
t.integer "updated_at", null: false
end
add_index "slow_queries", ["datetime"], name: "slow_queries_datetime_index"
add_index "slow_queries", ["period_per_hour"], name: "slow_queries_period_per_hour_index"
add_index "slow_queries", ["period_per_day"], name: "slow_queries_period_per_day_index"