Download the PHP package onlinepets/laravel-conditional-migrations without Composer

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

Deprecated:

We don't maintain this version anymore, checkout Laravel conditional migrations for the latest version


Laravel Conditional Migrations

Latest Version on Packagist Total Downloads Build Status StyleCI

This package allows you to configure migrations to run based on a condition. We expose a ConditionalMigration interface, which you can have your migrations implement to determine whether or not it should run.

Index

Installation

You'll have to follow a couple of steps to install this package.

Downloading

Via composer:

Or add the package to your dependencies in composer.json and run composer update on the command line to download the package:

Registering the service provider

If you're not using auto discovery, register the \Onlinepets\ConditionalMigrations\ServiceProvider in config/app.php:

Usage

To make sure a migration only runs between 1 AM and 2 AM, implement the ConditionalMigration interface and its ->shouldRun() method:

The code snippet above will make sure the do_something_very_intensive migration will be skipped unless it is executed between 1 AM and 2 AM. This can be useful if your migration does something that should not be run during the daytime, like adding an index to a table containing lots of data.

Nightly cronjob

To take full advantage of this package, you can schedule a task to migrate the database during the "whitelisted" times. This package does not implement this.

Configuration

You can optionally publish the configuration file:

This will create the file config/conditional-migrations.php, which is where you can configure whether your migrations should run, regardless of individual configuration:

You can also use a closure if you want to do more advanced calculations:

Contributing

All contributions (pull requests, issues and feature requests) are welcome. Make sure to read through the CONTRIBUTING.md first, though. See the contributors page for all contributors.

License

onlinepets/laravel-conditional-migrations is licensed under the MIT License (MIT). Please see the license file for more information.


All versions of laravel-conditional-migrations with dependencies

PHP Build Version
Package Version
Requires php Version ^7.0
laravel/framework Version 5.5.* || 5.6.*
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 onlinepets/laravel-conditional-migrations contains the following files

Loading the files please wait ....