Skip to content

Commit

Permalink
Update mysql.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
ov-anisa committed Dec 19, 2022
1 parent 7bb6ed7 commit d91e1db
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion module/DBify_Library/dep/orm/mysql.lua
Original file line number Diff line number Diff line change
Expand Up @@ -393,9 +393,12 @@ dbify.mysql = {
local queryLength = imports.table.length(queryArguments) - 1
local invalidColumns = dbify.mysql.column.areValid(tableName, validateColumns, true)
if invalidColumns then
local queryString, queryArguments = "ALTER TABLE `??`", {tableName}
for i = 1, imports.table.length(invalidColumns), 1 do
imports.dbExec(dbify.mysql.instance, "ALTER TABLE `??` ADD COLUMN `??` MEDIUMTEXT", tableName, invalidColumns[i])
imports.table.insert(queryArguments, invalidColumns[i])
queryString = queryString.." ADD COLUMN `??` MEDIUMTEXT"..(((i < imports.table.length(invalidColumns)) and ", ") or "")
end
imports.dbExec(dbify.mysql.instance, queryString, imports.table.unpack(queryArguments))
end
for i = 1, imports.table.length(dataColumns), 1 do
local j = dataColumns[i]
Expand Down

0 comments on commit d91e1db

Please sign in to comment.