<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/important-fix-in-laravel-13-20-same-second-migrations-bkrfgr3i8" -->

---
title: Important Fix in Laravel 13.20: Same-Second Migrations
description: Laravel 13.20 includes a fix for a bug where migrations generated in the same second receive identical timestamps, causing them to be ordered alphabetically....
canonical: https://daily.dev/posts/important-fix-in-laravel-13-20-same-second-migrations-bkrfgr3i8
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Important Fix in Laravel 13.20: Same-Second Migrations | daily.dev
og:description: Laravel 13.20 includes a fix for a bug where migrations generated in the same second receive identical timestamps, causing them to be ordered alphabetically....
og:url: https://daily.dev/posts/important-fix-in-laravel-13-20-same-second-migrations-bkrfgr3i8
og:image: https://api.daily.dev/og/posts/bKrfgr3i8.png
og:image:alt: Important Fix in Laravel 13.20: Same-Second Migrations
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.

# Important Fix in Laravel 13.20: Same-Second Migrations

**[Laravel Daily](https://daily.dev/sources/laraveldaily)** · 5 min read · 0 upvotes · 0 comments

## Summary

Laravel 13.20 includes a fix for a bug where migrations generated in the same second receive identical timestamps, causing them to be ordered alphabetically. This can result in foreign key errors when a dependent table migration runs before the parent table exists. The issue is especially tricky because SQLite silently ignores the ordering problem while MySQL throws an error, meaning AI agents working with SQLite may never detect it. The fix, contributed by community members Push Back and Nick and merged by Taylor Otwell, introduces a collision-free path function that increments the timestamp by one second at a time until a unique prefix is found, ensuring correct migration ordering even when multiple migrations are generated simultaneously.

## Full article

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

## Similar posts on daily.dev

- [New Expressive Model Attributes in Laravel 13.2.0](https://daily.dev/posts/new-expressive-model-attributes-in-laravel-13-2-0-d4iyewmhw) · Laravel News · 24 upvotes · 0 comments

---

Tags: [#database](https://daily.dev/tags/database), [#php](https://daily.dev/tags/php), [#laravel](https://daily.dev/tags/laravel), [#mysql](https://daily.dev/tags/mysql), [#sqlite](https://daily.dev/tags/sqlite)

[View this post on daily.dev](https://daily.dev/posts/important-fix-in-laravel-13-20-same-second-migrations-bkrfgr3i8)

```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":"Important Fix in Laravel 13.20: Same-Second Migrations","url":"https://daily.dev/posts/important-fix-in-laravel-13-20-same-second-migrations-bkrfgr3i8","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/important-fix-in-laravel-13-20-same-second-migrations-bkrfgr3i8"},"datePublished":"2026-07-16T07:21:54.743Z","dateModified":"2026-07-16T07:22:46.471Z","description":"Laravel 13.20 includes a fix for a bug where migrations generated in the same second receive identical timestamps, causing them to be ordered alphabetically....","image":"https://i.ytimg.com/vi/ruZdRaW_W7M/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/ruZdRaW_W7M/sddefault.jpg","isAccessibleForFree":true,"articleSection":"Laravel Daily","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":"Laravel Daily","logo":"https://media.daily.dev/image/upload/s--vzdgNGfl--/f_auto/v1725044498/logos/laraveldaily","url":"https://daily.dev/sources/laraveldaily"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/important-fix-in-laravel-13-20-same-second-migrations-bkrfgr3i8","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"database,php,laravel,mysql,sqlite","timeRequired":"PT5M","video":{"@type":"VideoObject","name":"Important Fix in Laravel 13.20: Same-Second Migrations","description":"Laravel 13.20 includes a fix for a bug where migrations generated in the same second receive identical timestamps, causing them to be ordered alphabetically....","thumbnailUrl":"https://i.ytimg.com/vi/ruZdRaW_W7M/sddefault.jpg","uploadDate":"2026-07-16T07:21:54.743Z","duration":"PT5M","url":"https://api.daily.dev/r/bKrfgr3i8","embedUrl":"https://www.youtube.com/embed/ruZdRaW_W7M"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Laravel Daily","item":"https://daily.dev/sources/laraveldaily"},{"@type":"ListItem","position":3,"name":"Important Fix in Laravel 13.20: Same-Second Migrations"}]}
```

