-
Notifications
You must be signed in to change notification settings - Fork 127
/
schema.rb
109 lines (97 loc) · 4.21 KB
/
schema.rb
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20180511194944) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
create_table "item_to_decom_table_mappings", force: :cascade do |t|
t.integer "item_id", null: false
t.integer "packet_config_id", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.integer "value_type"
t.integer "item_index"
t.integer "table_index"
t.boolean "reduced"
t.index ["item_id", "packet_config_id", "value_type"], name: "mapping_unique", unique: true
end
create_table "items", force: :cascade do |t|
t.string "name", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.integer "packet_id"
t.index ["packet_id", "name"], name: "index_items_on_packet_id_and_name", unique: true
end
create_table "packet_configs", force: :cascade do |t|
t.integer "packet_id", null: false
t.string "name", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.boolean "ready", default: false
t.datetime "start_time"
t.datetime "end_time"
t.integer "first_system_config_id", null: false
t.integer "max_table_index", default: -1
t.index ["packet_id", "name"], name: "index_packet_configs_on_packet_id_and_name", unique: true
end
create_table "packet_log_entries", force: :cascade do |t|
t.integer "target_id", null: false
t.integer "packet_id", null: false
t.datetime "time", null: false
t.integer "packet_log_id", null: false
t.bigint "data_offset", null: false
t.bigint "meta_id"
t.boolean "is_tlm", null: false
t.integer "decom_state", default: 0
t.boolean "ready", default: false
t.index ["decom_state"], name: "index_packet_log_entries_on_decom_state"
t.index ["time"], name: "index_packet_log_entries_on_time"
end
create_table "packet_logs", force: :cascade do |t|
t.text "filename", null: false
t.boolean "is_tlm", default: true, null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["filename"], name: "index_packet_logs_on_filename", unique: true
end
create_table "packets", force: :cascade do |t|
t.integer "target_id", null: false
t.string "name", null: false
t.boolean "is_tlm", default: true, null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["target_id", "name", "is_tlm"], name: "index_packets_on_target_id_and_name_and_is_tlm", unique: true
end
create_table "statuses", force: :cascade do |t|
t.bigint "decom_count", default: 0
t.bigint "decom_error_count", default: 0
t.text "decom_message", default: ""
t.datetime "decom_message_time"
t.bigint "reduction_count", default: 0
t.bigint "reduction_error_count", default: 0
t.text "reduction_message", default: ""
t.datetime "reduction_message_time"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
create_table "system_configs", force: :cascade do |t|
t.string "name", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["name"], name: "index_system_configs_on_name", unique: true
end
create_table "targets", force: :cascade do |t|
t.string "name", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["name"], name: "index_targets_on_name", unique: true
end
end