l4d.tools/db/schema.rb
2026-01-18 18:50:31 +01:00

111 lines
4.6 KiB
Ruby
Generated

# 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[8.1].define(version: 2026_01_18_200001) do
create_table "activities", force: :cascade do |t|
t.string "action", null: false
t.datetime "created_at", null: false
t.text "details"
t.integer "resource_id"
t.string "resource_type", null: false
t.datetime "updated_at", null: false
t.integer "user_id", null: false
t.index ["user_id", "created_at"], name: "index_activities_on_user_id_and_created_at"
t.index ["user_id"], name: "index_activities_on_user_id"
end
create_table "job_logs", force: :cascade do |t|
t.text "arguments"
t.datetime "created_at", null: false
t.text "error_message"
t.datetime "finished_at"
t.string "job_class"
t.string "job_id"
t.text "log_output"
t.integer "server_id"
t.datetime "started_at"
t.integer "status", default: 0, null: false
t.datetime "updated_at", null: false
t.index ["created_at"], name: "index_job_logs_on_created_at"
t.index ["job_id"], name: "index_job_logs_on_job_id"
t.index ["server_id"], name: "index_job_logs_on_server_id"
t.index ["status"], name: "index_job_logs_on_status"
end
create_table "overlays", force: :cascade do |t|
t.datetime "created_at", null: false
t.text "description"
t.string "name", null: false
t.string "overlay_type", default: "system", null: false
t.string "slug", null: false
t.datetime "updated_at", null: false
t.integer "user_id"
t.index ["user_id", "name"], name: "index_overlays_on_user_id_and_name", unique: true
t.index ["user_id"], name: "index_overlays_on_user_id"
end
create_table "server_templates", force: :cascade do |t|
t.text "config"
t.datetime "created_at", null: false
t.string "name", null: false
t.text "startup_params"
t.datetime "updated_at", null: false
t.integer "user_id", null: false
t.index ["user_id", "name"], name: "index_server_templates_on_user_id_and_name", unique: true
t.index ["user_id"], name: "index_server_templates_on_user_id"
end
create_table "servers", force: :cascade do |t|
t.datetime "created_at", null: false
t.datetime "last_health_check_at"
t.string "name", null: false
t.integer "port", null: false
t.string "rcon_password"
t.integer "server_template_id", null: false
t.integer "status", default: 0, null: false
t.string "unit_file_path"
t.datetime "updated_at", null: false
t.integer "user_id", null: false
t.index ["port"], name: "index_servers_on_port", unique: true
t.index ["server_template_id"], name: "index_servers_on_server_template_id"
t.index ["user_id", "name"], name: "index_servers_on_user_id_and_name", unique: true
t.index ["user_id"], name: "index_servers_on_user_id"
end
create_table "template_overlays", force: :cascade do |t|
t.datetime "created_at", null: false
t.integer "overlay_id", null: false
t.integer "position", null: false
t.integer "server_template_id", null: false
t.datetime "updated_at", null: false
t.index ["overlay_id"], name: "index_template_overlays_on_overlay_id"
t.index ["server_template_id", "overlay_id"], name: "index_template_overlays_unique", unique: true
t.index ["server_template_id", "position"], name: "index_template_overlays_position", unique: true
t.index ["server_template_id"], name: "index_template_overlays_on_server_template_id"
end
create_table "users", force: :cascade do |t|
t.datetime "created_at", null: false
t.string "steam_id", null: false
t.string "steam_username", null: false
t.datetime "updated_at", null: false
t.index ["steam_id"], name: "index_users_on_steam_id", unique: true
end
add_foreign_key "activities", "users"
add_foreign_key "overlays", "users"
add_foreign_key "server_templates", "users"
add_foreign_key "servers", "server_templates"
add_foreign_key "servers", "users"
add_foreign_key "template_overlays", "overlays"
add_foreign_key "template_overlays", "server_templates"
end