Download the PHP package fndmiranda/data-migration without Composer

On this page you can find all versions of the php package fndmiranda/data-migration. 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-migration

Data Migration

Total Downloads Latest Stable Version License

Data migrations from Laravel

This package simplifies the migration and synchronization of data between the application and the database, allowing you to control for example settings or permissions lists. Provides resources to view the status and changes not yet made, migrate and synchronize the data.

Installation

Usage

You may generate an data migration of the data-migration:make Artisan command:

This command will generate a data migration at app/DataMigrations/PermissionDataMigration.php. The data migration will contain the model, data, and options methods.

Property order (optional)

The order property defines the order of execution of data migrations class, default value is 0.

Property tag (optional)

The tag property is used in filter of data-migrations search, default value is production, if another value is set, it will have to pass to the tag parameter when executing the command.

Method model

Method to specify the model bound to the data migration class.

Method data

Method to specify the data to be migrated.

Method options

The options method to specify the parameters to be used in the migration.

The following keys are available as options:

Key Description Type
identifier Column with unique value to validate status. string
show Columns to show in commands output. array
relations Relationships options, see the usage with relationships. array

Run a data migration

You can run a data migration via command or facade.

Show the status of each data with the database with data-migration:status Artisan command:

Specifying the paths to search for data migrations.

Specifying the tags to search for data migrations.

Run data-migration:status only specific a data migration.

Output:

Or with DataMigration facade:

Show changes between data migration and database with data-migration:diff Artisan command:

Specifying the paths to search for data migrations.

Specifying the tags to search for data migrations.

Run data-migration:diff only specific a data migration.

Output:

Or with DataMigration facade:

Migrate data from a data migration to the database. Only necessary operations with status to create will be executed with data-migration:migrate Artisan command:

Specifying the paths to search for data migrations.

Specifying the tags to search for data migrations.

Run data-migration:migrate only specific a data migration.

Output:

Or with DataMigration facade:

Synchronize data from a data migration with the database. All necessary create, update, and delete operations will be performed with data-migration:sync Artisan command:

Specifying the paths to search for data migrations.

Specifying the tags to search for data migrations.

Run data-migration:sync only specific a data migration.

Output:

Or with DataMigration facade:

Show a list of data-migrations with data-migration:list Artisan command:

Specifying the paths to search for data migrations.

Specifying the tags to search for data migrations.

Usage with relationships

Example of a permissions model with a relationship for dependencies of type belongsToMany with pivot_example_1 and pivot_example_2, and a relationship for brand of type belongsTo to exemplify a data migration.

Method data with relationships

The data method to specify the data to be migrated with relationships.

Method options with relationships

The options method with relationships to specify the parameters to be used in the data migration.

The following keys are available as relationships options:

Key Description Type
relation Name of the relationship of the model. string
type Model relationship type, belongsToMany or belongsTo. string
identifier Column with unique value to validate status (only with belongsToMany). string
show Columns to show in commands output (only with belongsToMany). array

Events

Events when start and finish are available for when running a data-migration:migrate or data-migration:sync Artisan command.

onStartMigrate

Create the onStartMigrate method in your data migration to be called before the data-migration:migrate Artisan command is executed.

onFinishMigrate

Create the onFinishMigrate method in your data migration to be called after the data-migration:migrate Artisan command is executed.

onStartSync

Create the onStartSync method in your data migration to be called before the data-migration:sync Artisan command is executed.

onFinishSync

Create the onFinishSync method in your data migration to be called after the data-migration:sync Artisan command is executed.

Testing

Security

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

License

The MIT License (MIT). Please see License File for more information.


All versions of data-migration with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.0
laravel/framework Version ^5.5
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 fndmiranda/data-migration contains the following files

Loading the files please wait ....