Files
old-roraccounting/db/schema.rb
2020-10-09 16:12:44 +03:00

80 lines
2.9 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_10_09_114126) 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 "gangs", force: :cascade do |t|
t.text "chip_name"
t.text "chip_code"
t.text "chip_symbol"
t.boolean "chip_prefixed"
t.integer "chip_scale"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.text "name"
t.text "about"
end
create_table "homies", force: :cascade do |t|
t.text "name", null: false
t.integer "importance", default: 100, null: false
t.text "about"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.bigint "gang_id"
t.index ["gang_id"], name: "index_homies_on_gang_id"
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
t.datetime "deleted_at"
end
create_table "work", force: :cascade do |t|
t.text "description"
t.integer "amount"
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