惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Y
Y Combinator Blog
有赞技术团队
有赞技术团队
J
Java Code Geeks
H
Hackread – Cybersecurity News, Data Breaches, AI and More
美团技术团队
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Hugging Face - Blog
Hugging Face - Blog
人人都是产品经理
人人都是产品经理
酷 壳 – CoolShell
酷 壳 – CoolShell
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
C
Check Point Blog
博客园 - 【当耐特】
The GitHub Blog
The GitHub Blog
Recent Announcements
Recent Announcements
The Cloudflare Blog
Microsoft Azure Blog
Microsoft Azure Blog
腾讯CDC
Vercel News
Vercel News
IT之家
IT之家
MyScale Blog
MyScale Blog
博客园_首页
Martin Fowler
Martin Fowler
WordPress大学
WordPress大学
罗磊的独立博客

Blog — PlanetScale

Keeping a Postgres queue healthy — PlanetScale Patterns for Postgres Traffic Control — PlanetScale Graceful degradation in Postgres — PlanetScale High memory usage in Postgres is good, actually — PlanetScale Stripe Projects partnership: Provision PlanetScale Postgres and MySQL databases from the Stripe CLI — PlanetScale Enhanced tagging in Postgres Query Insights — PlanetScale Behind the scenes: How Database Traffic Control works — PlanetScale Introducing Database Traffic Control — PlanetScale Scaling Postgres connections with PgBouncer — PlanetScale Drizzle joins PlanetScale — PlanetScale Video Conferencing with Postgres — PlanetScale Faster PlanetScale Postgres connections with Cloudflare Hyperdrive — PlanetScale Introducing the PlanetScale MCP server — PlanetScale Database Transactions — PlanetScale Automating our changelog with Cursor commands — PlanetScale Postgres 18 is now available — PlanetScale Using MotherDuck with PlanetScale — PlanetScale $50 PlanetScale Metal is GA for Postgres — PlanetScale AI-Powered Postgres index suggestions — PlanetScale $5 PlanetScale is live — PlanetScale Announcing Vitess 23 — PlanetScale $50 PlanetScale Metal — PlanetScale Report on our investigation of the 2025-10-20 incident in AWS us-east-1 — PlanetScale $5 PlanetScale — PlanetScale Benchmarking Postgres 17 vs 18 — PlanetScale Larger than RAM Vector Indexes for Relational Databases — PlanetScale Partnering with Cloudflare to bring you the fastest globally distributed applications — PlanetScale Processes and Threads — PlanetScale PlanetScale for Postgres is now GA — PlanetScale Postgres High Availability with CDC — PlanetScale
Automatically copy migration data in PlanetScale branches...
Taylor Barnett · 2021-08-23 · via Blog — PlanetScale

Taylor Barnett |

Never accidentally reapply a past migration again! We've removed another barrier to using PlanetScale branches with the framework or migration tool of your choice. Now, you can automatically persist schema changes in your migration table across database branches.

Many frameworks and migration tools keep track of database schema changes in a migration table that includes data about what migrations have been applied and in what order. Without that migrations table data, many tools will incorrectly try to reapply previous migrations, which would cause errors during migration. The migrations table is the missing link that shows how we arrived at the current schema by recording which schema migrations were applied.

In PlanetScale, you can now turn on the ability to automatically copy migration data from these tables any time you open a deploy request or make a new database branch. There are built-in options for Rails, Phoenix, Django, .NET, Prisma, Sequelize, or you can specify the migration table name used by your framework or migration tool.

You may ask yourself, "How does this fit into my existing workflow?" Good question! Here's an example workflow from PlanetScale Software Engineer, Iheanyi Ekechukwu, demonstrating a schema migration with Prisma in a TypeScript application:

While this demo is using Prisma, many frameworks and migration tools will use a similar workflow. You can see our migration tutorials with Prisma and Ruby on Rails in the docs.

Update: We now recommend using prisma db push instead of prisma migrate dev with a shadow branch. Read more in our documentation about prisma db push and PlanetScale.

Give it a try, and let us know what you think!