leafo / lapis

A web framework for Lua and OpenResty written in MoonScript
http://leafo.net/lapis/
MIT License
3.12k stars 247 forks source link

SQL fields all nil using sqlite #785

Closed kmafeni04 closed 5 months ago

kmafeni04 commented 5 months ago

I'm using sqlite and this is the code:

    [1] = function()
        create_table("users", {
            { "id",       types.serial },
            { "username", types.varchar },
            { "email",    types.varchar },
            { "password", types.varchar },

            "PRIMARY KEY (id)"
        })

but I get this after migrating

SQL: CREATE TABLE "users" (
  "id" nil,
  "username" nil,
  "email" nil,
  "password" nil,
  PRIMARY KEY (id)
)

These fields aren't meant to be nil, is there something I'm doing wrong?