Files
old-roraccounting/db/schema.rb
2020-09-04 04:07:43 +03:00

57 lines
2.3 KiB
Ruby

# 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: 2020_08_27_142428) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
create_table "chip_values", force: :cascade do |t|
t.bigint "base_chip_id"
t.bigint "secondary_chip_id"
t.decimal "value", precision: 12, scale: 3, null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["base_chip_id", "secondary_chip_id"], name: "index_chip_values_on_base_chip_id_and_secondary_chip_id", unique: true
t.index ["base_chip_id"], name: "index_chip_values_on_base_chip_id"
t.index ["secondary_chip_id"], name: "index_chip_values_on_secondary_chip_id"
end
create_table "chips", force: :cascade do |t|
t.text "name", null: false
t.text "symbol", null: false
t.boolean "enabled", default: true
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["name"], name: "index_chips_on_name", unique: true
end
create_table "homies", force: :cascade do |t|
t.text "name", null: false
t.integer "importance", default: 5, null: false
t.text "about"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
create_table "money_moves", force: :cascade do |t|
t.text "description"
t.decimal "amount", precision: 12, scale: 3
t.integer "homie_id", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
add_foreign_key "chip_values", "chips", column: "base_chip_id"
add_foreign_key "chip_values", "chips", column: "secondary_chip_id"
end