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

Specifying backend=pgmoon now required? #768

Closed cycomachead closed 1 year ago

cycomachead commented 1 year ago

Sometime with 1.13.x or 1.14, it seems I now need to specify backend = "pgmoon" when using a postgres connection. In development, I think thing were fine but in our staging environment we saw the following error.

The update successfully completed, but it seems like the error was in reporting the success/failure of the action.

Anyway, I'd just like to confirm if this is the expected behavior or if there's some other configuration I should be making?


/usr/local/share/lua/5.1/lapis/application.lua:438: /usr/local/share/lua/5.1/lapis/db/base_model.lua:322: attempt to index local 'res' (a boolean value)
stack traceback:
    /usr/local/share/lua/5.1/lapis/db/base_model.lua: in function 'update'
    ./controllers/user.lua:591: in function <./controllers/user.lua:588>

stack traceback:
    [C]: in function 'error'
    /usr/local/share/lua/5.1/lapis/application.lua:438: in function 'handler'
    /usr/local/share/lua/5.1/lapis/application.lua:184: in function 'resolve'
    /usr/local/share/lua/5.1/lapis/application.lua:215: in function </usr/local/share/lua/5.1/lapis/application.lua:213>
    [C]: in function 'xpcall'
    /usr/local/share/lua/5.1/lapis/application.lua:213: in function 'dispatch'
    /usr/local/share/lua/5.1/lapis/nginx.lua:231: in function 'serve'
    content_by_lua(locations.conf:34):2: in main chunk
``
cycomachead commented 1 year ago

Oh, I made too many changes at once! It seems like the server didn't have the most recent pgmoon installed, which makes sense.

All is well. :)