PHPackages                             proai/laravel-super-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. proai/laravel-super-migrations

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

proai/laravel-super-migrations
==============================

This Laravel package is useful for big databases for a better migrations structure.

1.0.15(3mo ago)112.7k1[1 issues](https://github.com/ProAI/laravel-super-migrations/issues)MITPHPPHP ^8.3

Since Nov 25Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/ProAI/laravel-super-migrations)[ Packagist](https://packagist.org/packages/proai/laravel-super-migrations)[ Docs](http://github.com/proai/laravel-super-migrations)[ RSS](/packages/proai-laravel-super-migrations/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (2)Versions (17)Used By (0)

Laravel Super Migrations
========================

[](#laravel-super-migrations)

[![Latest Stable Version](https://camo.githubusercontent.com/344eb16942e6682379bada45ec86cc1e40480d1ee24dec478d6e6638ce5776db/68747470733a2f2f706f7365722e707567782e6f72672f70726f61692f6c61726176656c2d73757065722d6d6967726174696f6e732f762f737461626c65)](https://packagist.org/packages/proai/laravel-super-migrations) [![Total Downloads](https://camo.githubusercontent.com/c9cc7c427dfc84ccae0e46d1d91053bb24060d6328a75ba7f461d423365bd80b/68747470733a2f2f706f7365722e707567782e6f72672f70726f61692f6c61726176656c2d73757065722d6d6967726174696f6e732f646f776e6c6f616473)](https://packagist.org/packages/proai/laravel-super-migrations) [![Latest Unstable Version](https://camo.githubusercontent.com/4e9d48b134217bd30cf8c7cba950a1f0ee550376f7a61ce4ef7b6746af1a1b78/68747470733a2f2f706f7365722e707567782e6f72672f70726f61692f6c61726176656c2d73757065722d6d6967726174696f6e732f762f756e737461626c65)](https://packagist.org/packages/proai/laravel-super-migrations) [![License](https://camo.githubusercontent.com/0159cfc01052601bd6490054b55f5eaf207d27fbabbe49f7da8ba09c575b21a1/68747470733a2f2f706f7365722e707567782e6f72672f70726f61692f6c61726176656c2d73757065722d6d6967726174696f6e732f6c6963656e7365)](https://packagist.org/packages/proai/laravel-super-migrations)

This is an extension for the Laravel migrations. It is useful when you have a big database that results in a lot of migration files. This package will help you to reduce the number of migration files and furthermore it will give you a better structure with which you will have all schema updates for a table in one file.

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

[](#installation)

You can install the package via composer:

```
composer require proai/laravel-super-migrations
```

Usage
-----

[](#usage)

Basically we do not define table builder schemas by migration, but by table. For this purpose you need to create a `tables` folder in the `database/migrations` directory. For each table we will create a file in this new directory and link it in the migration files whereever needed. Here is a more detailed explanation:

### Migration Classes

[](#migration-classes)

Firstly here is a migration file in the `database/migrations` folder. Notice that we extend the `ProAI\SuperMigrations\Migration` class. Instead of an `up()` and a `down()` method this class needs a `schemas()` method:

```
