From the course: The Freelance Stack: Real Project with Next.js and Strapi

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Migrate local database from SQLite to Postgres to the production database

Migrate local database from SQLite to Postgres to the production database - Next.js Tutorial

From the course: The Freelance Stack: Real Project with Next.js and Strapi

Migrate local database from SQLite to Postgres to the production database

So, you only need to follow this video if you actually want to upload your local database exactly as it is into the cloud Postgres database that we created. If you're happy with having an empty database to start with, then you're pretty much already done when it comes to the data migration. You don't need to do any of this. Again, usually you would do it in a way where you just hand this over to your client now and then they can fill in the data. So in order for us to do this, our very first step is to actually turn our SQLite database into a Postgres database. And there's a lot of programs out there that do this for you, but they're usually not as easy as it seems. So luckily, Strapi actually has a way for handling this for us. So for Strapi to basically just give us an export of everything we need, we can just go into our repository, right, for me that is surfcam-strapi, and just run npm run strapi-export. There's going to be a question now for an encryption key. I'm just going to…

Contents