Kartik Scripts

Migration

MDT Dispatch V2 includes a robust, built-in migration tool to help you transition from MDT V1 without losing any historical data, police reports, medical files, or weapon and vehicle logs.

๐Ÿš€ How to Migrate

The migration process is automated and handled via a simple server-side console command.

1. Auto-Backup on Server Start

When you start the MDT Dispatch V2 (kartik-mdt) resource for the first time, it automatically detects any existing legacy V1 tables and safely renames them to a backup namespace with the prefix mdt_v1_ (e.g. mdt_profiles โ†’ mdt_v1_profiles).

This ensures your legacy data is fully preserved and isolated from the active V2 tables.

2. Run the Migration Command

Once the server has fully booted up and initialized, type the following command directly into your Server Console (txAdmin Live Console or Server Terminal CMD):

mdt_migrate

[!CAUTION] The mdt_migrate command can only be executed directly from the Server Console. It cannot be run by players in-game.


๐Ÿ“ฆ What is Migrated?

The migration script securely transfers all primary tables and maps legacy structures into advanced, V2-compliant JSON payloads.

Legacy Table / CategoryTarget V2 System & Description
Penal CodesLegacy mdt_criminal_codes are migrated and converted into the new mdt_penal_code table.
Citizen ProfilesLegacy profiles (mdt_profiles) are transferred to mdt_profiles while preserving fingerprint, DNA, warrants, and hazard tags.
Citizen NotesGeneral notes and legacy EMS notes are automatically extracted and converted into categorized records under mdt_citizen_notes.
Fake ProfilesMock identities (mdt_fake_profiles) are safely moved over to V2's fake profiles table.
WarrantsLegacy active and historical warrants (mdt_warrants) are migrated and mapped to V2.
Court Cases & NotesCases and legal descriptions (mdt_court_cases & mdt_court_case_notes) are fully migrated and formatted.
Weapons & Serial LogsWeapon registrations (mdt_weapons) are migrated and linked to custom weapon logs.
Vehicle Sightings & FlagsRegistered vehicles (mdt_vehicles) are moved to the new mdt_vehicle_records with flags and notes preserved.
Police & EMS ReportsLegacy reports (mdt_police_reports & mdt_ems_reports) are consolidated into a unified mdt_reports table, with advanced parsing for people involved, officers, evidence, and vehicles.
IncidentsAll police incidents are fully processed and consolidated into the V2 incidents table.

[!IMPORTANT] The migration process is safe to run. However, it is always recommended to take a full database backup before executing any migration script.

On this page