<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/automated-database-migrations-with-actor-model-ciktivuj5" -->

---
title: Automated Database Migrations with Actor Model | daily.dev
description: Actors in this system run automatic, lazy database migrations when they wake from sleep, since stateful compute is only running when needed. A networking layer...
canonical: https://daily.dev/posts/automated-database-migrations-with-actor-model-ciktivuj5
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Automated Database Migrations with Actor Model | daily.dev
og:description: Actors in this system run automatic, lazy database migrations when they wake from sleep, since stateful compute is only running when needed. A networking layer...
og:url: https://daily.dev/posts/automated-database-migrations-with-actor-model-ciktivuj5
og:image: https://api.daily.dev/og/posts/cIKtIVuj5.png
og:image:alt: Automated Database Migrations with Actor Model
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Automated Database Migrations with Actor Model

**[devtools-fm](https://daily.dev/sources/devtoolsfm)** · 1 min read · 0 upvotes · 0 comments

## Summary

Actors in this system run automatic, lazy database migrations when they wake from sleep, since stateful compute is only running when needed. A networking layer detects incoming requests and starts a sleeping actor before delivering the request, at which point pending migrations run. This works well because migrations are expected to be quick given the small, per-actor database sizes involved. First-party integrations exist for Diesel migrations, with a TypeScript-only Prisma version (via ORM v7) coming soon.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=GYOhaM2e4j8>

## Questions this post answers

### How do database migrations work for actors that are asleep in an actor model system?

Migrations run lazily rather than immediately: when an actor is asleep and a migration is triggered, nothing happens until the actor wakes up, at which point it applies the pending migration before handling the next request. A networking layer detects incoming requests to sleeping actors, wakes them, and then delivers the request, so migrations piggyback on that wake cycle. This design assumes migrations stay fast since per-actor databases are expected to be small, not terabytes.

_Following how actor-based stateful systems handle lazy migrations is easier with daily.dev's coverage of backend architecture._

### Does Prisma support migrations for actor-based or durable object style databases?

Not yet in the described setup, but a TypeScript-only version of Prisma, referred to as B7 (ORM v7), is coming soon to add first party migration support alongside existing Diesel migration integration for actor-based systems. Until then, Diesel is the primary supported migration path for this actor model architecture.

_Developers evaluating ORM options for new database tooling can track releases like this via daily.dev._

## Similar posts on daily.dev

- [Is Prisma 8 Ready for Long-Lived Production Apps?](https://daily.dev/posts/is-prisma-8-ready-for-long-lived-production-apps--dkqjwck1x) · Prisma Blog · 26 upvotes · 11 comments
- [The Prisma Tax: what migrations and casing actually cost you](https://daily.dev/posts/the-prisma-tax-what-migrations-and-casing-actually-cost-you-qvn0dwuxs) · Medium · 0 upvotes · 0 comments
- [Prisma Next Early Access: Write Your Contract, Prompt Your Agent, Ship Your App](https://daily.dev/posts/prisma-next-early-access-write-your-contract-prompt-your-agent-ship-your-app-fkrpmitw2) · Prisma Blog · 10 upvotes · 0 comments
- [Implementing Domain-Driven Design with KurrentDB: An Actor-Based Event Sourcing Approach](https://daily.dev/posts/implementing-domain-driven-design-with-kurrentdb-an-actor-based-event-sourcing-approach-9xvd2fcal) · Event Store · 0 upvotes · 0 comments
- [Prisma 7: Rust-Free Architecture and Performance Gains](https://daily.dev/posts/prisma-7-rust-free-architecture-and-performance-gains-xxoxfrq3z) · InfoQ · 60 upvotes · 9 comments

---

Tags: [#database](https://daily.dev/tags/database), [#serverless](https://daily.dev/tags/serverless), [#prisma](https://daily.dev/tags/prisma)

[View this post on daily.dev](https://daily.dev/posts/automated-database-migrations-with-actor-model-ciktivuj5)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Automated Database Migrations with Actor Model","url":"https://daily.dev/posts/automated-database-migrations-with-actor-model-ciktivuj5","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/automated-database-migrations-with-actor-model-ciktivuj5"},"datePublished":"2026-08-29T13:10:44.584Z","dateModified":"2026-08-29T13:11:03.967Z","description":"Actors in this system run automatic, lazy database migrations when they wake from sleep, since stateful compute is only running when needed. A networking layer...","image":"https://i.ytimg.com/vi/GYOhaM2e4j8/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/GYOhaM2e4j8/sddefault.jpg","isAccessibleForFree":true,"articleSection":"devtools-fm","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"devtools-fm","logo":"https://media.daily.dev/image/upload/s--yvUzE7NR--/f_auto/v1717745371/logos/devtoolsfm","url":"https://daily.dev/sources/devtoolsfm"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/automated-database-migrations-with-actor-model-ciktivuj5","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"database,serverless,prisma","timeRequired":"PT1M","video":{"@type":"VideoObject","name":"Automated Database Migrations with Actor Model","description":"Actors in this system run automatic, lazy database migrations when they wake from sleep, since stateful compute is only running when needed. A networking layer...","thumbnailUrl":"https://i.ytimg.com/vi/GYOhaM2e4j8/sddefault.jpg","uploadDate":"2026-08-29T13:10:44.584Z","duration":"PT1M","url":"https://api.daily.dev/r/cIKtIVuj5","embedUrl":"https://www.youtube.com/embed/GYOhaM2e4j8"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"devtools-fm","item":"https://daily.dev/sources/devtoolsfm"},{"@type":"ListItem","position":3,"name":"Automated Database Migrations with Actor Model"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/automated-database-migrations-with-actor-model-ciktivuj5#faq","mainEntity":[{"@type":"Question","name":"How do database migrations work for actors that are asleep in an actor model system?","acceptedAnswer":{"@type":"Answer","text":"Migrations run lazily rather than immediately: when an actor is asleep and a migration is triggered, nothing happens until the actor wakes up, at which point it applies the pending migration before handling the next request. A networking layer detects incoming requests to sleeping actors, wakes them, and then delivers the request, so migrations piggyback on that wake cycle. This design assumes migrations stay fast since per-actor databases are expected to be small, not terabytes. Following how actor-based stateful systems handle lazy migrations is easier with daily.dev's coverage of backend architecture."}},{"@type":"Question","name":"Does Prisma support migrations for actor-based or durable object style databases?","acceptedAnswer":{"@type":"Answer","text":"Not yet in the described setup, but a TypeScript-only version of Prisma, referred to as B7 (ORM v7), is coming soon to add first party migration support alongside existing Diesel migration integration for actor-based systems. Until then, Diesel is the primary supported migration path for this actor model architecture. Developers evaluating ORM options for new database tooling can track releases like this via daily.dev."}}]}
```

