What is the process for creating a new database with default tables and columns after messing up the previous one? #2152
-
During the migration of the database, I made an error that resulted in the creation of an incorrect column. This has led to an error popping up every time I attempt to start the Vendure server. Could you please advise me on how to create a new database with default tables and columns to rectify this issue? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi! 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 |
Beta Was this translation helpful? Give feedback.
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