Download the PHP package norgul/laravel-data-migrations without Composer

On this page you can find all versions of the php package norgul/laravel-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 laravel-data-migrations

Laravel Data Migrations

This package is used to deliver seamless data migrations to Laravel. Data migrations are version control system for your mandatory DB data (like statuses, types, etc.) without which the app wouldn't function.

One alternative is to burn these within your plain migrations, other is just to use seeders at which point you need to devise a mechanism to split production grade seeders from the development ones.

These are all good solutions as long as you follow some methodology and are consistent. The goal of this package was to deliver a real separation for this use case.

Installation

Require the package with composer require norgul/laravel-data-migrations. Service provider will be registered automatically.

Usage

You can start using the package by running commands below which are following Laravel migration command structure with, for the most part, the same API they provide.

Remember you can add -h flag to show all available options for a particular command.

Commands

Make Data Migration

php artisan make:data-migration {name}

Create your first data migration. This will create data-migrations directory in your database directory if it doesn't already exist, which is the place where you'll find already familiar naming structure.

Package is using Laravel migrator in the background, so if you run:

The table guesser will automatically add a data migration with users table stubbed in.

Even though you can reference Eloquent classes and even your seeders from within data migrations, it is highly recommended to use DB facade to execute queries. Reason behind it is that your classes and seeders may change over time, thus leaving your data migrations execute differently in the future. Always using DB facade will ensure that end results are always the same.

Data Migrate

php artisan data-migrate

Execute your migrations with data-migrate command. These will be executed once, in the same way as standard migrations are ran (by executing up() function).

Command will automatically create data_migrations table in the DB if it doesn't already exist.

Data Migrate Rollback

php artisan data-migrate:rollback

You can revert your changes by executing this command which will trigger down() function in the data migration.

Data Migrate Install

php artisan data-migrate:install

You never need to run this command explicitly. It is here for documentation purposes.

This command will create data_migrations table in your DB.


All versions of laravel-data-migrations with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4||^8.0
laravel/framework Version ^7.0||^8.0||^9.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 norgul/laravel-data-migrations contains the following files

Loading the files please wait ....