Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


sync does not create tables when used with sqlite (from tutorial) #1472

omouse opened this Issue · 3 comments

2 participants


I'm following the tutorial code on the site and when I'm using sqlite with an in-memory database, it doesn't create any tables.

Here's how my code looks:

The package.json includes sqlite and sequelize. I'm not sure what the bug could be.


Are you expecting to work?
All calls are asynchronous, so you can't do anything untill AFTER .sync() has finished running.


@mickhansen so you're saying I have to chain up the calls? I thought I could copy/paste the blocks of code from the Getting Started article and have it work. Might be nice if it was mentioned, though it might be more obvious once I have a few years of NodeJS experience...

@omouse omouse closed this

@omouse yes you have to chain the calls :)
I'll keep the doc thing in mind, usually it's not straight up a issue because usually in dev mode people will sync when they start the server and then do a model call based on an action. (Or they use a .sync() file).

But i admit our docs are probably not that clear if you're not from an async javascript background.

Internally sync(force: true) drops all tables and rebuilds - So when you do your save() call the table doesnt exist yet (hence it fails).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.