aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--util/sql.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/util/sql.lua b/util/sql.lua
index 736417bb..7c9743e1 100644
--- a/util/sql.lua
+++ b/util/sql.lua
@@ -262,6 +262,7 @@ function engine:_create_table(table)
for i,col in ipairs(table.c) do
sql = sql.."`"..col.name.."` "..col.type;
if col.nullable == false then sql = sql.." NOT NULL"; end
+ if col.primary_key == true then sql = sql.." PRIMARY KEY"; end
if i ~= #table.c then sql = sql..", "; end
end
sql = sql.. ");"