# 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.
#
# This file is the source Rails uses to define your schema when running `rails
# db:schema:load`. When creating a new database, `rails db:schema:load` tends to
# be faster and is potentially less error prone than running all of your
# migrations from scratch. Old migrations may fail to apply correctly if those
# migrations use external dependencies or application code.
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 2020_03_20_084449) do

  # These are extensions that must be enabled in order to support this database
  enable_extension "plpgsql"

  create_table "energy_consumes", force: :cascade do |t|
    t.integer "uuid", null: false
    t.integer "label"
    t.integer "year", null: false
    t.integer "month", null: false
    t.float "temperature", default: 0.0, null: false
    t.float "daylight", default: 0.0, null: false
    t.integer "energy_production", default: 0, null: false
    t.integer "house_id"
    t.datetime "created_at", precision: 6, null: false
    t.datetime "updated_at", precision: 6, null: false
    t.index ["house_id"], name: "index_energy_consumes_on_house_id"
    t.index ["uuid"], name: "index_energy_consumes_on_uuid", unique: true
  end

  create_table "houses", force: :cascade do |t|
    t.integer "uuid", null: false
    t.string "first_name"
    t.string "last_name"
    t.string "city"
    t.integer "living_count", default: 0, null: false
    t.boolean "has_child", default: false, null: false
    t.datetime "created_at", precision: 6, null: false
    t.datetime "updated_at", precision: 6, null: false
    t.index ["uuid"], name: "index_houses_on_uuid", unique: true
  end

end
