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 - 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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
-
-
-
(Locked)
Deployment overview6m 10s
-
(Locked)
Deploy Strapi server to Heroku13m 56s
-
(Locked)
Difference between production Strapi and local development2m 16s
-
(Locked)
Migrate local database from SQLite to Postgres to the production database16m 40s
-
(Locked)
Handle image uploads in production with AWS S320m 52s
-
(Locked)
Replace image paths in production db to use AWS S3 bucket images8m 37s
-
(Locked)
Deployment of Next.js frontend to Heroku7m 34s
-
(Locked)