PHPackages                             sestolk/laravel-batched-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. sestolk/laravel-batched-migrations

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

sestolk/laravel-batched-migrations
==================================

Make sure your database migrations are always unique

1.0.3(10y ago)250MITPHPPHP &gt;=5.5.9

Since Feb 6Pushed 10y ago1 watchersCompare

[ Source](https://github.com/sestolk/laravel-batched-migrations)[ Packagist](https://packagist.org/packages/sestolk/laravel-batched-migrations)[ RSS](/packages/sestolk-laravel-batched-migrations/feed)WikiDiscussions master Synced today

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

Laravel Batched Migrations
==========================

[](#laravel-batched-migrations)

[![License](https://camo.githubusercontent.com/25b9d5ffef86d78cd40569d608862c4f36c4d5e3d19631a90407ae655ad939cf/68747470733a2f2f706f7365722e707567782e6f72672f736573746f6c6b2f6c61726176656c2d626174636865642d6d6967726174696f6e732f6c6963656e73652e737667)](https://packagist.org/packages/sestolk/laravel-batched-migrations)[![Latest Stable Version](https://camo.githubusercontent.com/4bb4f8efceeaaf3a2e875f2db491f8d9b45f35437a551df456d425c3f63bc4f1/68747470733a2f2f706f7365722e707567782e6f72672f736573746f6c6b2f6c61726176656c2d626174636865642d6d6967726174696f6e732f762f737461626c652e737667)](https://packagist.org/packages/sestolk/laravel-batched-migrations)[![Total Downloads](https://camo.githubusercontent.com/c6fc1984bce566f78d4eb282d18e0ddf9322435f87d262cdb93079ce362ebb4d/68747470733a2f2f706f7365722e707567782e6f72672f736573746f6c6b2f6c61726176656c2d626174636865642d6d6967726174696f6e732f646f776e6c6f6164732e737667)](https://packagist.org/packages/sestolk/laravel-batched-migrations)

This package overrides the `make:migration` command and upon calling it applies a number to the end of the file when it already exists. Like so: `2016_01_01_151500_update_users_friends_1.php`

> Please note: This package and its examples are written for a PostgreSQL database. Therefore you frequently see the word **schema**. If you use MySQL or a different database type you can ommit the word **schema** and it will work just fine.

Installation
------------

[](#installation)

Require this package with composer:

```
composer require sestolk/laravel-batched-migrations

```

After updating composer, add the MigrationsServiceProvider to the providers array in config/app.php

```
sestolk\BatchedMigrations\MigrationsServiceProvider::class,

```

Configuration
-------------

[](#configuration)

Some configuration can be done by publishing the configuration file.

You *should* use Artisan to copy the default configuration file to `/config/batched.migrations.php` with the following command:

```
php artisan vendor:publish --provider="sestolk\BatchedMigrations\MigrationsServiceProvider"

```

Making Migrations
=================

[](#making-migrations)

On making a new migration you can use the following format and you won't have to worry about duplicate class/file-names. You can keep your filenames, just plain and simple like the names below.

Creating something new (like a table or schema)?
------------------------------------------------

[](#creating-something-new-like-a-table-or-schema)

```
php artisan make:migration create_{schema}_{table}

```

> Replace {schema} and {table} with the schema and table you are creating

Updating a table (like adding, removing or changing a column)?
--------------------------------------------------------------

[](#updating-a-table-like-adding-removing-or-changing-a-column)

```
php artisan make:migration update_{schema}_{table}

```

> Replace {schema} and {table} with the schema and table you are updating

Example?
--------

[](#example)

### Creating a table

[](#creating-a-table)

If I want to create a new table **friends** in the schema **users**, I run the following command on my local environment:

```
php artisan make:migration create_users_friends

```

### Updating a table

[](#updating-a-table)

If I want to update the existing table **friends** in the schema **users**, I run the following command on my local environment:

```
php artisan make:migration update_users_friends

```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity61

Established project with proven stability

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 ~2 days

Total

3

Last Release

3793d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1244010?v=4)[S.E. Stolk](/maintainers/sestolk)[@sestolk](https://github.com/sestolk)

---

Tags

laravelmigrationsbatched

### Embed Badge

![Health badge](/badges/sestolk-laravel-batched-migrations/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[spatie/laravel-medialibrary

Associate files with Eloquent models

6.1k41.3M607](/packages/spatie-laravel-medialibrary)[laravel/ai

The official AI SDK for Laravel.

1.0k2.1M169](/packages/laravel-ai)[kirschbaum-development/eloquent-power-joins

The Laravel magic applied to joins.

1.6k29.9M42](/packages/kirschbaum-development-eloquent-power-joins)[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8723.1M23](/packages/yajra-laravel-oci8)[glushkovds/phpclickhouse-laravel

Adapter of the most popular library https://github.com/smi2/phpClickHouse to Laravel

2051.4M2](/packages/glushkovds-phpclickhouse-laravel)

PHPackages © 2026

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