Download the PHP package northbees/data-migrations without Composer

On this page you can find all versions of the php package northbees/data-migrations. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package data-migrations

Data Migrations for Laravel

A queue-based data migration system for Laravel that separates structural database changes from data-heavy operations. Dispatch long-running data transformations as queued jobs with priority scheduling, type-safety, and production safeguards.

Why?

Standard Laravel migrations run synchronously during deployment. If you need to update 10 million rows, your deployment script will time out. This package dispatches data migrations as queued jobs so your deployment finishes immediately while data churns safely in the background.

Requirements

Installation

The service provider is auto-discovered. Publish the config and run migrations:

The package automatically loads its own migrations, so php artisan migrate is all you need. If you'd prefer to have the migration files in your application (e.g. to customise the schema), you can publish them:

This copies the migration files into your application's database/migrations/ directory. Once published, the package will no longer auto-load its copies — your published versions take precedence.

Configuration

Usage

Creating a data migration

This generates a timestamped file in database/data-migrations/:

Options:

Option Values Default
--priority high, low high
--type insert, alter, delete insert

Running data migrations

This will:

  1. Scan database/data-migrations/ for migration files.
  2. Filter out any already completed (recorded in data_migrations with a non-null completed_at).
  3. Assign a batch number and record each pending migration.
  4. Dispatch a ProcessDataMigration job for each one.

Checking status

Outputs a table showing each migration's batch, type, priority, and status (PENDING, COMPLETED, or FAILED).

Retrying failed migrations

How it works

Priority routing

Atomicity

When isTransactional() returns true on a migration, its up() method runs inside a database transaction. If it throws, the transaction is rolled back and nothing is written to completed_at. Set it to false for migrations that handle their own chunking or don't need atomic execution.

Error handling

If a job fails:

Delete guard

Set prevent_deletes_in_production to true in the config to block any migration with type delete from executing in the production environment. The job will throw a RuntimeException with a descriptive message.

Database schema

data_migrations

Column Type Description
id bigint (PK) Unique identifier
migration string Filename/class identifier
batch integer Groups migrations from the same run
type string insert, alter, or delete
priority string high or low
completed_at timestamp (nullable) Set on successful completion

failed_data_migrations

Column Type Description
id bigint (PK) Unique identifier
migration string Filename/class identifier
batch integer The batch it was attempted in
type string insert, alter, or delete
priority string high or low
exception text Exception message and stack trace
failed_at timestamp When the failure occurred

Deploying

To automatically run data migrations as part of your deployment, add a post-deploy script to your application's composer.json:

Then call it from your deployment pipeline:

Or invoke the command directly in your CI/CD script (e.g. GitHub Actions, Forge deploy script, Envoyer):

The key point is that data-migrate:run returns immediately after dispatching jobs to the queue. Your deployment is not blocked by long-running data operations — those execute in the background via your queue workers.

Testing

Or directly:

Static analysis

Code style

License

MIT


All versions of data-migrations with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/console Version ^12.0|^13.0
illuminate/database Version ^12.0|^13.0
illuminate/queue Version ^12.0|^13.0
illuminate/support Version ^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package northbees/data-migrations contains the following files

Loading the files please wait ...