PlanetScale killed their hobby plan (and how to migrate off)

The Nugget

  • Migrating from PlanetScale to another database service, such as Railway for MySQL, is a viable solution for those affected by PlanetScale's discontinuation of their free hobby plan. The process involves dumping, organizing, and transferring data to a new MySQL database, adjusting environment variables in your application to connect to the new database.

Key quotes

  • "PlanetScale... removed their hobby plan and now you have to pay $40 a month for their database services."
  • "I'm cheap and so I decided to migrate off PlanetScale."
  • "The service I migrated to is Railway, but there's tons of other services out there."
  • "Migrating from a PlanetScale database to another database service is doable, with MySQL as the recommended target due to compatibility."
  • "The database is probably the most critical piece of infrastructure, and you should be paying for it."

Key insights

Migrating from PlanetScale to Another Service

  • Decision to Migrate: The decision was driven by the discontinuation of PlanetScale's hobby plan, which previously allowed free database service usage, prompting users to look for more cost-effective alternatives.
  • Choosing a New Service: Railway was chosen for the migration because it supports MySQL, similar to the underlying database used by PlanetScale, making the transition smoother.
  • Process Overview: Migrating involves steps like turning off compute functions to prevent new data insertion, dumping existing data from PlanetScale, organizing it into a cohesive schema file, and running these scripts in the new database environment.

Technical Steps for Data Migration

  • Initial Steps: The process begins by stopping active data insertion and dumping the database content using pscale database dump.
  • Data Organization: The dumped SQL files are combined into a single schema file for ease of use, this involves concatenating various SQL scripts.
  • Database Setup on the New Service: Setting up the new MySQL database on Railway involves updating environment variables and ingesting the organized SQL scripts to reconstruct the database structure and content.
  • Final Adjustments: The last step is updating the application's environment variables to connect to the new database, ensuring functionality without PlanetScale.

Make it stick

  • 🔄 Migrate wisely: When PlanetScale drops its hobby plan, look towards services like Railway for a smooth transition.
  • 💾 SQL we go again: Use pscale database dump and then concatenate all files into a single schema for simpler database setup elsewhere.
  • 🌐 Environment Variables are Key: Updating your app’s environment variables to point to a new database is the final step toward migration success.
  • 💰 Pay for stability: "The database is probably the most critical piece of infrastructure, and you should be paying for it."
This summary contains AI-generated information and may have important inaccuracies or omissions.