Closed vikramkh closed 5 years ago
I realized now I should have used reset, but now that the table is gone, how do I re run migrate, because if I try reset now, it will tell me that the schema does not exist, but migrate will say that no migrations to run
Ok not sure how but I figured it out. However, is lbstarter.dbs being used? I tried to add my own code to the sql files but was getting errors and I wasn't sure if I needed to modify somewhere else to fit the new tables that I was adding in?
@vikramkh Few things to note here -
npm run db:migrate
again. It will work.npm run db:migrate:reset
. It will run all your down scripts in reverse order and will empty its own table 'migrations' in DB.npm run db:migrate:down
. It will run the last down script and remove it from migrations table.Please have a read at the documentation of db-migrate to learn about how useful this tool is for handling db migrations and versioning.
Ok not sure how but I figured it out. However, is lbstarter.dbs being used? I tried to add my own code to the sql files but was getting errors and I wasn't sure if I needed to modify somewhere else to fit the new tables that I was adding in?
lbstarter.dbs is the project file for DbSchema tool that we have used to create Entity-relationship diagram for the database and execute it into database directly. It helps in keeping the DB schema intact, up to date and easily shareable. It can also be used to extract DB scripts out of it for migrations sqls.
Install DbSchema and open this file there. You will see the entire ERD.
Hope this helps.
Thanks so much for the help!
Ok not sure how but I figured it out. However, is lbstarter.dbs being used? I tried to add my own code to the sql files but was getting errors and I wasn't sure if I needed to modify somewhere else to fit the new tables that I was adding in?
lbstarter.dbs is the project file for DbSchema tool that we have used to create Entity-relationship diagram for the database and execute it into database directly. It helps in keeping the DB schema intact, up to date and easily shareable. It can also be used to extract DB scripts out of it for migrations sqls.
Install DbSchema and open this file there. You will see the entire ERD.
Hope this helps.
@samarpan-b Is there a mongodb version of the schema available that you could share or steps on how to convert the postgres version to mongodb are also welcome?
Thanks
@argupta23 I don't have a mongodb version available right now. I'll need some time to provide you for that. I'll try next week. Please raise a separate feature request for this.
If you are able to do it before that, feel free to contribute with a PR.
How do I re run db: migrate? I changed the sql files and wanted to re run migrate but it just says nothing to migrate. I emptied my database and it still wont migrate, it just says No migrations to run.