Jobs, grades, employees and every other database row stay where they are. V2 imports the V1 files once, imports the settings saved in game once, and keeps the V1 tables untouched.
What changes for the server owner
| V1 | V2 |
|---|---|
ensure ox_lib, ensure jcks_ui |
ensure jcks_lib (jcks_ui is replaced, ox_lib is no longer a dependency of JCKS Jobs) |
data/config.lua and the other data/*.lua files |
settings/*.lua and settings/server/config.lua |
client/editable.lua, server/editable.lua |
editable/client.lua, editable/server.lua |
Server settings in the table jcks_job_settings |
settings/config.json |
Configuration in the table jcks_job_config |
settings/config.json |
Config.UI.theme, Config.UI.accent |
/jcks, Appearance in jcks_bridge |
Config.JobGroups |
Job groups in /jobadmin, Groups |
Steps
- Stop the server and make a database backup.
- Upload jcks_lib and the V2 versions of jcks_bridge and jcks_jobs over the V1 folders. Keep your V1 files in the folder, V2 reads them.
- In
server.cfgreplaceensure jcks_uiwithensure jcks_liband start it before jcks_bridge. See Installation. - Start the server and read the console. Then open
/jcks, Overview, and/jobadmin, Configuration.
1. File import
The manifest names every V1 file and its V2 place:
jcks_import 'data/config.lua > settings/config.lua'
jcks_import 'data/config.tools.lua > settings/config.tools.lua'
jcks_import 'data/config.services.lua > settings/config.services.lua'
jcks_import 'data/config.dispatch.lua > settings/config.dispatch.lua'
jcks_import 'data/config.server.lua > settings/server/config.lua'
jcks_import 'client/editable.lua > editable/client.lua'
jcks_import 'server/editable.lua > editable/server.lua'On the first start jcks_lib copies these files once and lists what changed in the console and in /jcks, Overview. If the old version runs from another folder, V2 imports from there and stops the old resource. Remove its folder and its ensure line. Files you already changed in V2 are never overwritten, the report says not imported for them.
After the copy, the bridge restarts JCKS Jobs so the imported files load. Without jcks_bridge running the console asks for a restart.
The imported files are then compared with defaults/: new V2 settings get their default value, settings that V2 no longer uses are listed, your own list entries (for example Config.Billing.presets, Config.TrunkProps.catalog, Config.Restraints.types, Config.Medical.treatments) are never refilled, new default entries are only listed. V1 runtime files data/<name>.json are moved to settings/<name>.json.
2. Settings saved in game
V1 kept the values changed in Server settings in jcks_job_settings and the values changed in Configuration in jcks_job_config. On the first V2 start the importer runs once by itself:
- every V1 value is checked against the V2 rules of its option (type, range, allowed values) and mapped to the V2 option with the same path,
- a V1 value is imported only when V2 still uses the default for that option,
- a value already changed in V2 is never replaced on its own. The console prints how many were kept,
- options V1 did not have or did not change keep the V2 default,
- options that no longer exist in V2 are skipped.
UI.themeandUI.accentare reported as moved to jcks_lib, - grade rights new in V2 are added where V1 allowed the same thing, once: Buy with company money (
society_purchase) to every grade that could reach a shop paid from the company account, Activity log (activity) to every grade with Statistics (stats). Boss grades already have every right.
Before anything changes, the current V2 values and the grade rights are written to settings/v1-import-backup-<date>-<time>.json. The run is written to the activity log (category admin, action v1_import). If the backup cannot be written, nothing is imported.
Import again later
/jobadmin, Configuration shows Import from V1 while V1 data is in the database. It lists every V1 value with its state:
| State | Meaning |
|---|---|
| new | Will be imported |
| conflict | Differs from what you set in V2. Imported only when you tick it |
| same | Already the same |
| moved | Lives in another resource now |
| invalid | Fails the V2 rules of the option |
| unknown | Not in V2 |
The grade rights can be added again with the switch. Every run writes a new backup file.
3. Database
| Data | What happens |
|---|---|
| Jobs, grades, locations, employees, activity, transactions, applications, invoices, warrants, reports, evidence, MDT data, jail, logs | Stay in the same tables |
Drug plants and processing tables (jcks_job_plants, jcks_job_drug_tables), drug settings and the lockpick settings of doors |
Kept, but no longer used. Drugs and door lockpicking are not part of V2 |
New columns: overdue on invoices, ref and more on evidence, approved_by and approved_at on reports, archive columns on jcks_job_dashcam_events |
Added on start, V1 rows keep working |
| New tables (groups, gigs, doors, minigames, restaurants, court, cases, SOPs and more) | Created on start |
Config.JobGroups |
Copied into job groups on the first start with the groups table (dispatch units and MDT on, calls off) |
jcks_job_settings, jcks_job_config |
Read only. Never changed or deleted. Drop them yourself when you no longer need them |
4. jcks_bridge and jcks_lib
The bridge setup from V1 (framework, groups, script settings, access rules) is imported by jcks_bridge, see Bridge migration. The V1 look becomes a V2 theme. Player UI settings from jcks_ui are imported by jcks_lib, see jcks_lib installation.
5. What to check by hand
editable/server.luaandeditable/client.lua: the hook functions are the same as in V1. A function missing in your file runs the default one and the console names it.- Item lists: V2 adds items for gigs, templates, medical gear and restaurants. Copy what you need from
install/. - Keys: binds now use jcks_lib and show on the Keys page of
/jcks. - New modules are on by default: gigs, doors, fire, restaurants, minigames. Turn off what you do not want with their
enabledswitch. - Drugs and door lockpicking were removed.
data/config.drugs.luais not imported,Config.DrugsandConfig.Doors.lockpickare not read. Their values saved in game stay insettings/config.json.
From the old jobs resource
When the table jobs_markers exists on the first start, its locations (stashes, boss menus, wardrobes) are imported active into jcks_job_points. The old table is left untouched. The convar jobs_admin_licenses still grants admin access.