You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.7 KiB
39 lines
1.7 KiB
# 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 `bin/rails
|
|
# db:schema:load`. When creating a new database, `bin/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[7.0].define(version: 2023_03_26_160630) do
|
|
create_table "combats", force: :cascade do |t|
|
|
t.integer "result"
|
|
t.string "name"
|
|
t.integer "left_fighter_id", null: false
|
|
t.integer "right_fighter_id", null: false
|
|
t.integer "winner_id"
|
|
t.datetime "created_at", null: false
|
|
t.datetime "updated_at", null: false
|
|
t.index ["left_fighter_id"], name: "index_combats_on_left_fighter_id"
|
|
t.index ["right_fighter_id"], name: "index_combats_on_right_fighter_id"
|
|
t.index ["winner_id"], name: "index_combats_on_winner_id"
|
|
end
|
|
|
|
create_table "creatures", force: :cascade do |t|
|
|
t.string "name"
|
|
t.integer "health_points"
|
|
t.datetime "created_at", null: false
|
|
t.datetime "updated_at", null: false
|
|
t.integer "size"
|
|
end
|
|
|
|
add_foreign_key "combats", "creatures", column: "left_fighter_id"
|
|
add_foreign_key "combats", "creatures", column: "right_fighter_id"
|
|
add_foreign_key "combats", "creatures", column: "winner_id"
|
|
end
|