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

推荐订阅源

博客园 - 司徒正美
大猫的无限游戏
大猫的无限游戏
腾讯CDC
J
Java Code Geeks
博客园 - 【当耐特】
Microsoft Azure Blog
Microsoft Azure Blog
V
Visual Studio Blog
人人都是产品经理
人人都是产品经理
博客园 - Franky
博客园 - 聂微东
阮一峰的网络日志
阮一峰的网络日志
美团技术团队
云风的 BLOG
云风的 BLOG
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
U
Unit 42
雷峰网
雷峰网
B
Blog RSS Feed
博客园_首页
量子位
F
Fortinet All Blogs
罗磊的独立博客
H
Hackread – Cybersecurity News, Data Breaches, AI and More
酷 壳 – CoolShell
酷 壳 – CoolShell
C
Check Point Blog

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!