ryanwold.net

A civic-minded citizen seeking the singularity

Back to Entries

Migrating from MySQL to PostgreSQL

release
Date: 2015-12-13
Tags: ruby rails data

I recently moved from a self-hosted MySQL database to a free instance of Postgres on Heroku.

This entailed getting the data from the MySQL database into the Postgres database. I found the yaml_db .gem particularly useful here.

  1. run rake db:data:dump to create a db/data.yml file of all the data in your database
  2. change database.yml to the new database's URL - something like postgres://...amazonaws.com...
  3. run rake db:data:load to load the db/data.yml file into the Postgres database

By Ryan Wold · © 2015–2026 Ryan Wold

Licensed CC BY-NC 4.0. AI training requires a license — machine-readable terms.

Enjoyed this? — any BSV wallet, HandCash, or plain old dollars.

Leave a tip

Tips go directly to a Bitcoin SV address I control — peer to peer, no platform in between. A few thousand satoshis is a fraction of a cent; it's the gesture that counts.

From any BSV wallet

Scan the QR code with your wallet's camera, or copy the address.

177DwUfSTW8RkFBJzYYcgr1YB8ngbhTYAc

With HandCash or any paymail wallet

Paymail is an email-style address for Bitcoin wallets. Send any amount to afomi@handcash.io

First time using Bitcoin? Yours Wallet is an open-source browser extension wallet, and HandCash is an easy mobile wallet — either takes a minute to set up.

Prefer regular money? Support via OpenCollective.