mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 01:08:54 +00:00
refactor: store migrations in core table
This commit is contained in:
@@ -4,7 +4,7 @@ RegisterCommand("resetmigrations", function(src)
|
||||
return
|
||||
end
|
||||
|
||||
for version, _ in pairs(Migrations or {}) do
|
||||
for version, _ in pairs(Core.Migrations or {}) do
|
||||
DeleteResourceKvp(("esx_migration:%s"):format(version))
|
||||
end
|
||||
print("^2[SUCCESS]^7 Reset all migrations. This will re-run all migrations on the next server start.")
|
||||
@@ -12,7 +12,7 @@ end)
|
||||
|
||||
local migrationsRan = 0
|
||||
|
||||
for esxVersion, migrations in pairs(Migrations or {}) do
|
||||
for esxVersion, migrations in pairs(Core.Migrations or {}) do
|
||||
---@cast esxVersion string
|
||||
---@cast migrations table<string, function>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Migrations = Migrations or {}
|
||||
Migrations["v1.13.3"] = Migrations["v1.13.3"] or {}
|
||||
Core.Migrations = Core.Migrations or {}
|
||||
Core.Migrations["v1.13.3"] = Core.Migrations["v1.13.3"] or {}
|
||||
|
||||
Migrations["v1.13.3"].ssn = function()
|
||||
Core.Migrations["v1.13.3"].ssn = function()
|
||||
print("^4[esx_migration:v.1.13.3:ssn]^7 Adding SSN column to users table.")
|
||||
local col = MySQL.scalar.await([[
|
||||
SELECT COUNT(*)
|
||||
|
||||
Reference in New Issue
Block a user