schema.rb 2.58 KB
# 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: 20180608220338) do

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

  create_table "bet", force: :cascade do |t|
    t.integer "match_id",    null: false
    t.integer "user_id",     null: false
    t.integer "score_local", null: false
    t.integer "score_visit", null: false
    t.integer "result"
    t.integer "points"
  end

  create_table "heimdall_engine_role_abilities", force: :cascade do |t|
    t.integer  "role_id"
    t.string   "key"
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
    t.index ["key"], name: "index_heimdall_engine_role_abilities_on_key", using: :btree
    t.index ["role_id"], name: "index_heimdall_engine_role_abilities_on_role_id", using: :btree
  end

  create_table "heimdall_engine_roles", force: :cascade do |t|
    t.string   "name"
    t.boolean  "erasable",   default: false
    t.datetime "created_at",                 null: false
    t.datetime "updated_at",                 null: false
    t.datetime "deleted_at"
    t.index ["deleted_at"], name: "index_heimdall_engine_roles_on_deleted_at", using: :btree
  end

  create_table "match", force: :cascade do |t|
    t.string  "local",       null: false
    t.string  "visit",       null: false
    t.date    "date",        null: false
    t.integer "score_local"
    t.integer "score_visit"
    t.integer "result"
    t.integer "pool_id",     null: false
  end

  create_table "pool", force: :cascade do |t|
    t.string   "name",           null: false
    t.datetime "editable_until", null: false
    t.boolean  "active"
  end

  create_table "users_roles", force: :cascade do |t|
    t.integer "user_id"
    t.integer "role_id"
    t.index ["role_id"], name: "index_users_roles_on_role_id", using: :btree
    t.index ["user_id"], name: "index_users_roles_on_user_id", using: :btree
  end

end