Reconcile Missing Keys Automatically
When you ship a content update adding a new Gems currency or PetIndex table, returning players will load older save dictionaries without those fields. Run a recursive reconcile step on join that fills any missing keys from your canonical template.
Keep Explicit Version Integers for Breaking Refactors
Include a SchemaVersion field inside every saved profile. Whenever a data structure changes shape — such as converting an array of pet names into dictionary objects with unique GUIDs — run an ordered migration chain sequentially on load.
Production Luau Reference
ServerScriptService/Data/Reconcile.luau
Luau
local function Reconcile(target, template)
for k, v in template do
if target[k] == nil then
target[k] = if typeof(v) == "table" then table.clone(v) else v
end
end
end