[{"data":1,"prerenderedAt":253},["ShallowReactive",2],{"/docs/scripts/treasurehunt/reference/database-and-updates":3,"/docs/scripts/treasurehunt/reference/database-and-updates-surround":241,"/docs/scripts/treasurehunt/reference/database-and-updates-implemented-suggestions":252},{"id":4,"title":5,"body":6,"description":231,"extension":232,"head":233,"implementedSuggestions":233,"meta":234,"navigation":235,"path":236,"schemaOrg":233,"seo":237,"sitemap":238,"stem":239,"__hash__":240},"docs/1.docs/scripts/6.treasurehunt/4.reference/3.database-and-updates.md","Database and updates",{"type":7,"value":8,"toc":222},"minimark",[9,22,27,147,150,154,177,180,184,194,201,208,212,219],[10,11,12,13,17,18,21],"p",{},"Treasure Hunt uses ",[14,15,16],"code",{},"oxmysql"," through Sky Base. Startup creates the required tables and applies included migrations. ",[14,19,20],{},"import.sql"," mirrors table creation for manual setup; it is not an inventory-item installer or a switch that disables migrations.",[23,24,26],"h2",{"id":25},"saved-data","Saved data",[28,29,30,43],"table",{},[31,32,33],"thead",{},[34,35,36,40],"tr",{},[37,38,39],"th",{},"Table",[37,41,42],{},"Contents",[44,45,46,57,67,77,87,97,107,117,127,137],"tbody",{},[34,47,48,54],{},[49,50,51],"td",{},[14,52,53],{},"sky_treasurehunt_progress",[49,55,56],{},"Detector XP, find counts and trading statistics",[34,58,59,64],{},[49,60,61],{},[14,62,63],{},"sky_treasurehunt_skills",[49,65,66],{},"Learned detector skills",[34,68,69,74],{},[49,70,71],{},[14,72,73],{},"sky_treasurehunt_collection",[49,75,76],{},"Unique discovered item IDs per character",[34,78,79,84],{},[49,80,81],{},[14,82,83],{},"sky_treasurehunt_balance",[49,85,86],{},"Balance migration version and discovery protection",[34,88,89,94],{},[49,90,91],{},[14,92,93],{},"sky_treasurehunt_methods",[49,95,96],{},"General, magnet, diving and bin-search progress, skills and method state",[34,98,99,104],{},[49,100,101],{},[14,102,103],{},"sky_treasurehunt_magnet_casts",[49,105,106],{},"Personal magnet depletion history",[34,108,109,114],{},[49,110,111],{},[14,112,113],{},"sky_treasurehunt_diving_air",[49,115,116],{},"Remaining air per character and scuba tier",[34,118,119,124],{},[49,120,121],{},[14,122,123],{},"sky_treasurehunt_diving_spots",[49,125,126],{},"Confirmed underwater finds and their state",[34,128,129,134],{},[49,130,131],{},[14,132,133],{},"sky_treasurehunt_trash_bins",[49,135,136],{},"Shared bin results and refill times",[34,138,139,144],{},[49,140,141],{},[14,142,143],{},"sky_treasurehunt_depleted",[49,145,146],{},"Detector location refill times",[10,148,149],{},"Character ownership uses the identity supplied by Jobs Base's player cache. Keep character identifiers consistent when changing frameworks or character systems.",[23,151,153],{"id":152},"update-an-existing-installation","Update an existing installation",[155,156,157,165,168,171,174],"ol",{},[158,159,160,161,164],"li",{},"Back up the resource configuration and all ",[14,162,163],{},"sky_treasurehunt_*"," tables. Include the framework's inventory/account data in a coordinated server backup.",[158,166,167],{},"Replace the resource with the new download and merge your settings into the new configuration files.",[158,169,170],{},"Register newly supplied equipment and find items before restarting the resource.",[158,172,173],{},"Start with the required dependencies and inspect the server console for migration or item errors.",[158,175,176],{},"Reconnect with an existing character and check the album, method progress, equipment and remaining scuba air.",[10,178,179],{},"Startup performs specific supported migrations. It does not repair every possible manually altered schema, column type or missing index. Do not delete existing tables to resolve a migration error; identify the failing statement and compare the schema with the supplied release.",[23,181,183],{"id":182},"included-progression-migrations","Included progression migrations",[10,185,186,187,190,191,193],{},"The general tree moves shared trading and learning progression out of the old detector-only allocation. The ",[14,188,189],{},"general"," row in ",[14,192,93],{}," records that migration. Balance version 3 updates XP curves once while preserving the intended progression level.",[10,195,196,197,200],{},"The revised magnet, diving and bin skill trees reset incompatible older allocations once, using ",[14,198,199],{},"skills.__version = 2"," as their marker. Earned XP and points, finds, history, inventory and remaining air are retained. Players can spend the points again in the revised paths. This method-tree reset does not reset the general or detector trees.",[10,202,203,204,207],{},"Older detector depletion stored under ",[14,205,206],{},"depleted:v1"," is migrated into the depletion table. Preserve resource-local saved data when moving an existing server installation as well as backing up SQL.",[23,209,211],{"id":210},"moving-from-the-old-standalone-detector","Moving from the old standalone detector",[10,213,214,215,218],{},"Do not blindly copy character identifiers from the old ",[14,216,217],{},"van_md_*"," tables. The standalone resource used a different owner source; map those identifiers to the current character IDs before migrating data. Keep the installed resource name stable because resource-local saved data is associated with it.",[10,220,221],{},"Inventory/account persistence and Treasure Hunt SQL are separate systems. After a hard crash during a reward or sale, investigate the affected character and transaction before manually restoring items or money.",{"title":223,"searchDepth":224,"depth":225,"links":226},"",1,2,[227,228,229,230],{"id":25,"depth":225,"text":26},{"id":152,"depth":225,"text":153},{"id":182,"depth":225,"text":183},{"id":210,"depth":225,"text":211},"Know which Treasure Hunt data to back up and what the included migrations change for existing characters.","md",null,{},true,"/docs/scripts/treasurehunt/reference/database-and-updates",{"title":5,"description":231},{"loc":236},"1.docs/scripts/6.treasurehunt/4.reference/3.database-and-updates","ZMnwLUHmt0MA2gPHx5CEmONDXB99FQOwD7lKLfi_wno",[242,247],{"title":243,"path":244,"stem":245,"description":246,"children":-1},"Commands and controls","/docs/scripts/treasurehunt/reference/commands","1.docs/scripts/6.treasurehunt/4.reference/2.commands","Default player bindings, administrator access and the exact scope of Treasure Hunt's progression commands.",{"title":248,"path":249,"stem":250,"description":251,"children":-1},"Troubleshooting","/docs/scripts/treasurehunt/reference/troubleshooting","1.docs/scripts/6.treasurehunt/4.reference/4.troubleshooting","Resolve installation, inventory, shop, search, sound, air and saved-progress issues in Sky Treasure Hunt.",[],1791911969844]