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 Postgres.

Database Migration can be used as:

Important Note

This package is the command line interface of ByJG PHP Migration. To get more information about the the project and how to please visit: https://github.com/byjg/migration

Installing

Running in the command line

Migration library creates the 'migrate' script. It has the follow syntax:

Commands

Basic Usage

The basic usage is:

The --path specify where the base.sql and migrate scripts are located. If you omitted the --path it will assume the current directory. You can also set the MIGRATE_PATH environment variable with the base path

The uri://connection is the uri that represents the connection to the database. You can see here to know more about the connection string.

You can omit the uri parameter if you define it in the MIGRATE_CONNECTION environment variable and the parameter path with MIGRATE_PATH environment variable

Command: create

Create a empty directory structure with base.sql and migrations/up and migrations/down for migrations. This is useful for create from scratch a migration scheme.

Ex.

Command: install

If you already have a database but it is not controlled by the migration system you can use this method for install the required tables for migration.

Command: update

Will apply all necessary migrations to keep your database updated.

Update command can choose if up or down your database depending on your current database version. You can also specify a version:

Command: reset

Creates/replace a database with the "base.sql" and apply ALL migrations

Note on reset: You can disable the reset command by setting the environment variable MIGRATE_DISABLE_RESET to true:

Related Projects

Dependencies


Open source ByJG


All versions of migration-cli with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
byjg/migration Version 4.9.*
symfony/console Version ^5.4|^6.0|^7.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 byjg/migration-cli contains the following files

Loading the files please wait ....