We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f677715 commit 7a154b2Copy full SHA for 7a154b2
Classes/DbScriptExtensions_Database.ext
@@ -133,7 +133,15 @@ function Database:GetTableInformations()
133
obj.isPrimaryKey = true
134
end
135
obj.defaultValue = columnTypeFunctions[dataType]()(query, 4)
136
- if (type(obj.defaultValue) == "string") then
+ if (obj.defaultValue == nil) then
137
+ if (columnTypeFunctions[dataType]() == ColumnType.String) then
138
+ obj.defaultValue = "\"\""
139
+ elseif (columnTypeFunctions[dataType]() == ColumnType.Bool) then
140
+ obj.defaultValue = "false"
141
+ else
142
+ obj.defaultValue = 0
143
+ end
144
+ elseif (type(obj.defaultValue) == "string") then
145
obj.defaultValue = "\""..obj.defaultValue.."\""
146
147
table.insert(columns, obj)
0 commit comments