JCKSDocs
JCKS JobsV2Pierwsze kroki

Updating

How to update JCKS Jobs without setting it up again, which files hold your jobs and what to check after the update.

The general steps for every JCKS script are on Updating JCKS scripts. Coming from V1: Migration from V1.

Steps

  1. Dump the database. Jobs, grades, points, members, invoices, MDT data and logs are in the jcks_jobs, jcks_job_* and jcks_restaurant_* tables.
  2. Stop the server.
  3. Update jcks_lib and jcks_bridge first when the changelog asks for newer ones (Requires).
  4. Replace everything in jcks_jobs except settings/ and editable/. Always replace defaults/.
  5. Start the server and read the console.

Never delete

File What is in it
settings/*.lua, settings/server/config.lua Your settings files
settings/config.json Configuration changed in game (/jobadmin, Configuration and Server settings)
settings/settings.json Setup state of the first start
settings/gigs.json Gigs and gig presets
settings/legacy.json, settings/import.json Record of the V1 import, keeps it from running twice
settings/update-backup-*.json Backups made before each update
editable/client.lua, editable/server.lua Your hooks

Database

The tables are created and changed on start. Every change is safe to run again: missing tables, columns and indexes are added, and one time data migrations are recorded in jcks_job_migrations so they run once. A migration that fails prints its id and runs again on the next start. Nothing is deleted.

After the update

  • The console lists new settings that use their default value. Change them in /jobadmin, Server settings, or in the settings files.
  • New editable functions run their default code. The defaults of every version are on Default editable files (V1: here).
  • New default entries of lists you own (recipes, restaurant menus, billing presets and the other jcks_collection lists) are only listed, never added. Copy the ones you want from defaults/settings/.
  • Commands and keys that changed are under Breaking in the changelog.

Troubleshooting

jcks_jobs 2.0.1 needs newer JCKS resources. Update the named resource first, see Order.

A setting changed in game is back to its default after the update. settings/config.json was replaced or deleted. Restore it from settings/update-backup-<n>.json (key files) or from your own backup, then restart.

Texts show their key or are in English. Your own locales/*.json misses new texts. The console lists them, copy them from defaults/locales/.