handle chip and chip values operations

This commit is contained in:
Bilal
2020-09-04 04:07:43 +03:00
parent 6a1920caf3
commit 99e8b9c6f2
8 changed files with 197 additions and 4 deletions

View File

@@ -10,11 +10,31 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2019_06_20_200006) do
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
@@ -31,4 +51,6 @@ ActiveRecord::Schema.define(version: 2019_06_20_200006) do
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