mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-04 08:13:21 +00:00
ensure migration order
This commit is contained in:
+17
-6
@@ -2,14 +2,25 @@ MySQL.ready(function()
|
||||
|
||||
print('[esx] ensuring migrations')
|
||||
|
||||
TriggerEvent('esx:migrations:ensure', function(module)
|
||||
ESX.EnsureMigrations(module)
|
||||
end)
|
||||
local index = 0
|
||||
local results = {}
|
||||
local start
|
||||
local manifest = LoadResourceFile(GetCurrentResourceName(), 'fxmanifest.lua')
|
||||
|
||||
end)
|
||||
repeat
|
||||
|
||||
start, index = manifest:find("esxmodule '.-'", index)
|
||||
|
||||
if start then
|
||||
|
||||
local module = manifest:sub(start, index):sub(12):sub(0, -2)
|
||||
|
||||
ESX.EnsureMigrations(module)
|
||||
|
||||
end
|
||||
|
||||
until not start
|
||||
|
||||
AddEventHandler('esx:migrations:ensure', function(register)
|
||||
register('base')
|
||||
end)
|
||||
|
||||
RegisterNetEvent('esx:onPlayerJoined')
|
||||
|
||||
Reference in New Issue
Block a user