gx0r/connect-session-knex

Sessions table creation error on MariaDB

cappuccio opened this issue · 2 comments

Hi, i tried to use this module to store my sessions, but I'm encountering an error when it tries to create a dedicated table to store the sessions:

Unhandled rejection Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'json not null, 'expired' datetime not null)' at line 1

It is clearly due to the fact that the json format is only supported by MariaDB 10.2+.

Related to #50

gx0r commented

I'd love to support this but I'm just one person, and the amount of differences among databases (even major versions of the same database) has become untenable to maintain.

I might just recommend copy pasting the code into your project and tailoring it to your use case as needed, as trying to support everything is too much for me.