DatabaseUpdater
This module provides a simple way to update the database by versions given by a json file.
If the current version of the fxmanifest.lua
is behind the latest version in the json file, the database will be updated. All versions
(see json file) higher than the current version of the fxmanifest.lua
will be updated.
Important: Ensure that the folder db
exists in your resource. All sql files must be placed in this folder with the following naming convention: [VERSION].sql
(e.g. 0.0.1.sql
).
Important: Ensure that all queries inside the sql files are separated by ;
(semicolon).
Important: Ensure that the version in the fxmanifest.lua
is a valid version (e.g. 0.0.1
) and matches with the naming convention of the sql files.
Important: It is not necessary to add the db folder to the fxmanifest.lua
.
Example for json file:
Example for server scripts:
Last updated