PlanetScale is a MySQL-compatible database platform built on Vitess, the technology that powers YouTube's databases. Its headline idea is simple: your database gets branches, just like your code. You test a schema change on a branch, review it, and merge it β without ever running a risky migration directly on production.
How does it work? You create a database in the PlanetScale console, and you connect to it with a normal MySQL connection string. When you want to change the schema, you create a branch, make your changes there, and open a deploy request. PlanetScale checks the change for problems, and you merge it when it is safe.
# Install the CLI and connect to your database brew install planetscale/tap/pscale pscale auth login pscale database create my-app --region us-east pscale shell my-app main
Enter fullscreen mode
Exit fullscreen mode
-- It is MySQL β your existing SQL works CREATE TABLE users ( id INT AUTO_INCREMENT PRIMARY KEY , name VARCHAR ( 255 ) NOT NULL , email VARCHAR ( 255 ) UNIQUE NOTβ¦