|
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: 2020_08_17_111403) do |
| 13 | +ActiveRecord::Schema.define(version: 2020_08_21_110618) do |
14 | 14 |
|
15 | 15 | # These are extensions that must be enabled in order to support this database |
16 | 16 | enable_extension "plpgsql" |
|
63 | 63 | t.index ["user_id"], name: "index_activities_on_user_id" |
64 | 64 | end |
65 | 65 |
|
| 66 | + create_table "totals", force: :cascade do |t| |
| 67 | + t.bigint "user_id", null: false |
| 68 | + t.date "date", null: false |
| 69 | + t.integer "duration", default: 0 |
| 70 | + t.decimal "distance", default: "0.0" |
| 71 | + t.datetime "created_at", precision: 6, null: false |
| 72 | + t.datetime "updated_at", precision: 6, null: false |
| 73 | + t.index ["user_id"], name: "index_totals_on_user_id" |
| 74 | + end |
| 75 | + |
66 | 76 | create_table "users", force: :cascade do |t| |
67 | 77 | t.string "email", default: "", null: false |
68 | 78 | t.string "encrypted_password", default: "", null: false |
|
83 | 93 |
|
84 | 94 | add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id" |
85 | 95 | add_foreign_key "activities", "users" |
| 96 | + add_foreign_key "totals", "users" |
86 | 97 | end |
0 commit comments