Skip to content
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

When using Knex, it does not create table #2136

Closed
thormengkheang opened this issue Dec 20, 2019 · 4 comments
Closed

When using Knex, it does not create table #2136

thormengkheang opened this issue Dec 20, 2019 · 4 comments

Comments

@thormengkheang
Copy link

Bug report

Describe the bug

When using Knex, it does not create table.

To Reproduce

yarn create keystone-app todo-app

project name: todo
template: Todo
adaptor: knex

createdb todo

Expected behaviour

When I go to check if the table exists in pgAdmin, it does not.

Screenshots

image

image

System information

  • OS: macOS
  • Browser (if applies): Chrome
@thomascallahan
Copy link

Same here, but on Windows. If I manually create the table and rows, it kind of works but I'm clearly not setting something up in the ID field correctly because newly-created items have blank IDs. Everything works just fine when using MongoDB.

I've been working on a very large and complicated project for about a year now using MongoDB and Keystone 4. For a smaller personal project I wanted to try Keystone 5 and my web host offers Postgres so I was hoping to use it rather than pay for MongoDB hosting somewhere separate from my web host. Between this issue and what seems to be the need to manually add rows and tables anytime the data model changes, Postgres may be more trouble than it's worth.

@stale
Copy link

stale bot commented Apr 22, 2020

It looks like there hasn't been any activity here in over 6 months. Sorry about that! We've flagged this issue for special attention. It wil be manually reviewed by maintainers, not automatically closed. If you have any additional information please leave us a comment. It really helps! Thank you for you contribution. :)

@stale stale bot added the needs-review label Apr 22, 2020
@dijs
Copy link

dijs commented May 12, 2020

I am having the same issues. No tables are created on initialization. It's very frustrating.

@stale stale bot removed the needs-review label May 12, 2020
@MadeByMike
Copy link
Contributor

This is expected behaviour. You'll need to run yarn create-tables see the quick start guide here: https://www.keystonejs.com/quick-start/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants