JG Docs
Dealerships

Migrating from v1

This guide is only useful if you want to keep all the data from your v1 installation. If you want to start from scratch with v2, follow the installation guide instead.

Back up everything before you start! Dealerships v2 is new, and there is a risk you could lose your existing data. Back up your existing database table, and your previous working version of JG Dealerships v1.

Before You Begin

Back up your existing config.lua file before proceeding. You'll need it later.

Replace Script Files

  1. Delete all existing files in your jg-dealerships folder
  2. Extract the new v2 files downloaded from Portal into the folder
  3. Copy your backed-up config.lua into config/config.lua, replacing the new one

Add New Configuration Options

Add the following new v2 options to the bottom of your config.lua:

Config.UseFrameworkJobs = false
Config.InteractionMethod = "textui" -- or "target", "3dtextui", "radial"
Config.Target = "auto" -- or "ox_target"
Config.DrawText3d = "auto" -- or "sleepless_interact"
Config.RadialMenu = "auto" -- or "ox_lib"
Config.BlipNameFormat = "Dealership: %s"
Config.EntityStreamingDistance = 100.0 -- Distance in meters at which entities despawn/respawn
Config.TruckingMissionForOrderDeliveries = true
Config.DealershipMaxActiveTestDrives = 5 -- Maximum number of active test drives per dealership
Config.EmployeePermissions = {
  ["Manager"] = {
    "ADMIN", -- Full access
  },
  ["Supervisor"] = {
    "MANAGE_INVENTORY",
    "VIEW_RECORDS",
    "SELL",
    "DELIVER",
  },
  ["Sales"] = {
    "SELL",
    "VIEW_RECORDS",
    "DELIVER",
  },
}

Restart and Migrate Database

  1. Fully restart your server
  2. Run the migration command using one of these methods:
    • Type /migratev2 in the in-game chat
    • Run migratev2 in the txAdmin server console

Import Your Locations

  1. Navigate to /dealeradmin in-game
  2. Click the Import button
  3. Select "Existing Config" (described as: Import locations from your config.lua (for v1 migration))
  4. Follow the import wizard to complete the process

Done!

Your v1 data should now be migrated to v2. Verify your dealership locations and check all functionality is working as expected.

On this page