Download the PHP package byjg/migration-cli without Composer

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

Database Migrations (CLI)

Build Status Opensource ByJG GitHub source GitHub license GitHub release

This is a simple library written in PHP for database version control. Currently supports SQLite, MySQL, SQL Server and PostgreSQL.

Database Migration can be used as:

Important Note

This package is the command line interface of ByJG PHP Migration.

Key Points:

For PHP API Integration: If you want to integrate migrations directly into your PHP code (e.g., for automated testing or programmatic control), use the core migration library instead:

For complete information about the migration system, architecture, and advanced usage, visit the core project documentation: https://github.com/byjg/migration

Installing

Documentation

Quick Start

The basic usage is:

Connection String Examples:

Using Environment Variables:

Or use a .env file:

Available Commands

The migration tool provides the following commands:

Command Description
create Create the directory structure for migrations
install Install or upgrade the migration version table in an existing database
version Get the current database version
update Intelligently migrate up or down based on current version
up Migrate up to a newer version
down Migrate down to an older version
reset Create a fresh database from base.sql and apply all migrations

Command Options

All commands (except create) support these options:

Quick Examples

Environment Variables

Variable Description Default
MIGRATE_CONNECTION Database connection string -
MIGRATE_PATH Path to migration files Current directory
MIGRATE_TABLE Name of the migration version table migration_version
MIGRATE_DISABLE_RESET Disable the reset command false

Related Projects

Dependencies


Open source ByJG


All versions of migration-cli with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1 <8.4
byjg/migration Version ^5.0
symfony/console Version ^5.4|^6.0|^7.0
vlucas/phpdotenv Version ^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 byjg/migration-cli contains the following files

Loading the files please wait ...