Changing a Rails App from Mysql to Postgres

Опубликовано: 23 Октябрь 2024
на канале: Phil Smy
931
40

In this video, I take a real, live Rails (5) app and switch it from using MySQL to using Postgres. Of course, most of this is not about switching it is about moving the data from one database to the other. I show you how to do that.

I'll be using Docker to quickly host both databases.

00:00 Introduction
00:35 Changes to the Rails app
04:35 Configuring Docker Compose
06:30 Create database and Load the schema
07:35 Load the data into MySQL
10:30 Using PGLoader
13:45 Importing the data


💾 Get all the files needed for this from the gist here:
https://bit.ly/32McUfA

➡️ Find PG Loader here: https://github.com/dimitri/pgloader


Some people online just talk - I just do. One of my major SaaS products out there is Zonmaster.com (https://public.zonmaster.com) THE AutoResponder and Customer Management tool for Amazon Sellers. Join over 17,000 other Amazon Sellers and sign up today!

Looking for great hosting? I've been using DigitalOcean for 7 years and they have never let me down. Amazing.
Check them out here https://m.do.co/c/f1c6edf8597f and get $100(!!!) free credits towards the cost of servers.

#rubyOnRails #entrepreneurship #softwareDevelopment