PHPackages                             sebastiaanluca/laravel-unbreakable-migrations - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. sebastiaanluca/laravel-unbreakable-migrations

AbandonedArchivedLibrary[Database &amp; ORM](/categories/database)

sebastiaanluca/laravel-unbreakable-migrations
=============================================

Prevent your Laravel database migrations from failing irreversibly by using transactional queries.

0.3.0(7y ago)91.3k1MITPHPPHP ^7.2

Since Jan 24Pushed 7y ago1 watchersCompare

[ Source](https://github.com/sebastiaanluca/laravel-unbreakable-migrations)[ Packagist](https://packagist.org/packages/sebastiaanluca/laravel-unbreakable-migrations)[ Docs](https://www.github.com/sebastiaanluca/laravel-unbreakable-migrations)[ RSS](/packages/sebastiaanluca-laravel-unbreakable-migrations/feed)WikiDiscussions develop Synced 2mo ago

READMEChangelogDependencies (5)Versions (5)Used By (0)

Laravel Unbreakable Migrations
==============================

[](#laravel-unbreakable-migrations)

[![Latest stable release](https://camo.githubusercontent.com/b20d58d29b263635828f51a7f9de15e9250723a995959243cbd0a34dde048548/68747470733a2f2f706f7365722e707567782e6f72672f7365626173746961616e6c7563612f6c61726176656c2d756e627265616b61626c652d6d6967726174696f6e732f76657273696f6e)](https://packagist.org/packages/sebastiaanluca/laravel-unbreakable-migrations)[![Software license](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](LICENSE.md)[![Build status](https://camo.githubusercontent.com/28eea67ecf5966d462180d2aef1cae64b5672fbc5086bd9a7d84634b4ada2b9d/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7365626173746961616e6c7563612f6c61726176656c2d756e627265616b61626c652d6d6967726174696f6e732f6d61737465722e737667)](https://travis-ci.org/sebastiaanluca/laravel-unbreakable-migrations)[![Total downloads](https://camo.githubusercontent.com/d6d387ab5a904dfa50a08ac371740a482130e283e8b4a732fc7665381fb5d008/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7365626173746961616e6c7563612f6c61726176656c2d756e627265616b61626c652d6d6967726174696f6e732e737667)](https://packagist.org/packages/sebastiaanluca/laravel-unbreakable-migrations)

[![Read my blog](https://camo.githubusercontent.com/0760b582e22202bd412feb64f5f87b6459f64a0b8ea5fdd24cbadf87df736177/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c696e6b2d626c6f672d6c69676874677265792e737667)](https://blog.sebastiaanluca.com)[![View my other packages and projects](https://camo.githubusercontent.com/5ce3a83ee0ec2b4ae47a99f67347c1d8e78582757eca80fe31c98e5bd0e2185a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c696e6b2d6f746865725f7061636b616765732d6c69676874677265792e737667)](https://packagist.org/packages/sebastiaanluca)[![Follow @sebastiaanluca on Twitter](https://camo.githubusercontent.com/bde346ed8efc8b2458386b36256c64e3fe010276f449b80fe4f663c4c8bbd83e/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f666f6c6c6f772f7365626173746961616e6c7563612e7376673f7374796c653d736f6369616c)](https://twitter.com/sebastiaanluca)[![Share this package on Twitter](https://camo.githubusercontent.com/cb820a0ecc9645168e33b03925d7f14691262ddbaeaf66a0a91697803d0cba2d/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f75726c2f687474702f736869656c64732e696f2e7376673f7374796c653d736f6369616c)](https://twitter.com/intent/tweet?text=Prevent%20your%20Laravel%20database%20migrations%20from%20failing%20by%20wrapping%20them%20in%20transactions.%20https%3A%2F%2Fgithub.com%2Fsebastiaanluca%2Flaravel-unbreakable-migrations%20via%20%40sebastiaanluca&source=webclient)

**Prevent your Laravel database migrations from failing by wrapping them in transactions.**

Table of contents
-----------------

[](#table-of-contents)

- [Requirements](#requirements)
- [How to install](#how-to-install)
    - [Laravel 5.5](#laravel-55)
    - [Laravel 5.4](#laravel-54)
- [How to use](#how-to-use)
- [License](#license)
- [Change log](#change-log)
- [Testing](#testing)
- [Contributing](#contributing)
- [Security](#security)
- [Credits](#credits)
- [About](#about)

Requirements
------------

[](#requirements)

- PHP 7.1 or higher
- Laravel 5.4 or higher

How to install
--------------

[](#how-to-install)

### Laravel 5.5

[](#laravel-55)

From Laravel 5.5 and onwards, this package supports auto-discovery. Just add the package to your project using composer and you're good to go!

```
composer require sebastiaanluca/laravel-unbreakable-migrations
```

### Laravel 5.4

[](#laravel-54)

Install the package through Composer by using the following command:

```
composer require sebastiaanluca/laravel-unbreakable-migrations
```

Add the service provider to the `providers` array in your `config/app.php` file:

```
'providers' => [

    SebastiaanLuca\Migrations\Providers\UnbreakableMigrationsServiceProvider::class,

]
```

How to use
----------

[](#how-to-use)

### Generating migrations

[](#generating-migrations)

### Unbreakable migrations in detail

[](#unbreakable-migrations-in-detail)

- `migrateUp`
- `migrateDown`
- `$tables`
- `drop`
- `dropAllTables`
- `dropColumn`
- `tableExists`
- …

### Transactional migration

[](#transactional-migration)

License
-------

[](#license)

This package operates under the MIT License (MIT). Please see [LICENSE](LICENSE.md) for more information.

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
composer install
composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Sebastiaan Luca](https://github.com/sebastiaanluca)
- [All Contributors](../../contributors)

About
-----

[](#about)

My name is Sebastiaan and I'm a freelance Laravel developer specializing in building custom Laravel applications. Check out my [portfolio](https://www.sebastiaanluca.com) for more information, [my blog](https://blog.sebastiaanluca.com) for the latest tips and tricks, and my other [packages](https://packagist.org/packages/sebastiaanluca) to kick-start your next project.

Have a project that could use some guidance? Send me an e-mail at !

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~293 days

Total

3

Last Release

2807d ago

PHP version history (2 changes)0.1.0PHP ^7.0

0.2.0PHP ^7.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/711940?v=4)[Sebastiaan Luca](/maintainers/sebastiaanluca)[@sebastiaanluca](https://github.com/sebastiaanluca)

---

Top Contributors

[![sebastiaanluca](https://avatars.githubusercontent.com/u/711940?v=4)](https://github.com/sebastiaanluca "sebastiaanluca (56 commits)")

---

Tags

databaselaravelmigrationspackagephpreversibletransactionallaraveldatabasemigrationstransactionstransactionalundounbreakableroll back

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sebastiaanluca-laravel-unbreakable-migrations/health.svg)

```
[![Health](https://phpackages.com/badges/sebastiaanluca-laravel-unbreakable-migrations/health.svg)](https://phpackages.com/packages/sebastiaanluca-laravel-unbreakable-migrations)
```

###  Alternatives

[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k7.2M71](/packages/mongodb-laravel-mongodb)[spiritix/lada-cache

A Redis based, automated and scalable database caching layer for Laravel

591444.8k2](/packages/spiritix-lada-cache)[pdphilip/elasticsearch

An Elasticsearch implementation of Laravel's Eloquent ORM

145360.2k4](/packages/pdphilip-elasticsearch)[dragon-code/laravel-data-dumper

Adding data from certain tables when executing the `php artisan schema:dump` console command

3418.6k](/packages/dragon-code-laravel-data-dumper)[toponepercent/baum

Baum is an implementation of the Nested Set pattern for Eloquent models.

3154.7k](/packages/toponepercent-baum)[orptech/laravel-migration-partition

Laravel extensions that extends Illuminate to enable partitioned table creation within Laravel migrations.

3426.7k](/packages/orptech-laravel-migration-partition)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
