-
-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
createTableIfMissing not working #200
Comments
The Regarding main issue: I'll give it a look |
Sorry, I misspoke earlier, this is the one of my modules that actually doesn't yet generate its own types, see #155 I unfortunately also got sidetracked with an issue in another project that affected this project, so never got around to look at this in the weekend, sorry :/ |
No problem, I'm using https://github.com/kleydon/prisma-session-store - since I'm using Prisma anyway this is a better fit. |
Hello, I am having the same issue. Table is not created if I set Code sample:
This flag is very useful for containerised environments. |
This bug makes the module unusable for my use cases. So I have to move to a new module. https://www.npmjs.com/package/connect-session-sequelize |
@prionkor You can always set up the tables yourself, as shown in: https://github.com/voxpelli/node-connect-pg-simple#installation The I haven't got that much to go on here and I'm quite short on time at the moment so I would have to debug it deeper, and can't promise when I get time to do that. But for future reference, for those who might arrive here: If |
I too am hitting this bug. It just won't create itself. |
I don't see its types declared anywhere? How are you using its types? (Looking at it, tsconfig points to index.js, and there is lots of annotations) |
I suggest anyone coming to the repo try out https://www.npmjs.com/package/connect-session-sequelize instead, which is much more maintained. Nothing against voxpelli, they have done excellent work with connect-pg-simple. connect-pg-simple works but does not fit my need of TypeScript + auto creating the tables. |
I corrected myself earlier:
Part of the reason is that this has to interact with express-session and for a long time those types were a bit so-so, making it hard to make something useful of it. Apart from that: The focus of this module is to be the simplest postgres session module for express, thus depending on nothing but the pg module itself, enabling it to be used for most scenarios. If one needs a more complex solution, then it’s correct to look for that in another solution. If one believes this module fails in delivering what it intends to deliver, then let’s fix it 🙂 |
Well said 🙂 I want to heavily emphasize I am not implying anything negative about the work - it is once again, excellent. I would try to fix the mentioned issues myself, I just don't have the time either right now. 😆 |
I am facing the same problem, I think the issue is with the sql script for the table creation. When running the table.sql in my database I get I found that removing |
Hello Mr. voxpelli as i understand for now we better use this? ALTER TABLE "session" ADD CONSTRAINT "session_pkey" PRIMARY KEY ("sid") NOT DEFERRABLE INITIALLY IMMEDIATE; CREATE INDEX "IDX_session_expire" ON "session" ("expire"); |
Make sure you install The |
Thanks @aboqasem, I had forgotten that Sorry everyone for not thinking of this myself earlier. I'll close this issue as solved for now, if an update to |
I've come across the same error as specified prior: Failed to prune sessions: relation "sessions" does not exist
node:events:368
throw er; // Unhandled 'error' event
^ I currently remain unable to implement database storage because of this. |
I'm seeing this with 7.0.0. Once created manually theres no issue. |
With the following
I just get
Failed to prune sessions: relation "session" does not exist
on start anderror: relation "session" does not exist
on the first request.Also, without
as any
I getArgument of type '{ createTableIfMissing: boolean; }' is not assignable to parameter of type 'PGStoreOptions'.
, so@types/connect-pg-simple
seems to be outdated.The text was updated successfully, but these errors were encountered: