Skip to content

What is the process for creating a new database with default tables and columns after messing up the previous one? #2152

Answered by michaelbromley
JordenLCH asked this question in Q&A
Discussion options

You must be logged in to vote

Hi!
The simplest way is to drop all tables from your database (or delete the db and re-create), and then run the Vendure server with dbConnectionOptions.synchronize: true.

If you want the demo data to also be populated, you can do something like you see here: https://github.com/vendure-ecommerce/vendure-demo/blob/master/src/reset-server.ts#L74-L101

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@JordenLCH
Comment options

Answer selected by JordenLCH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants