Download the PHP package diontruter/migrate without Composer

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

migrate

Simple SQL migration tool

SimpleMigration is the main class containing migration functions. Can be called in command ine mode via:

or otherwise individual functions can be used:

Upward migrations will process all migration files not yet processed, and downward migrations will only run the downward migration script for the latest migration.

Migration scripts must be in this format: '\<id>-\<u|d>[description].sql' Valid examples:

Migrations are tracked via the ID part of the file name, and grouped into upward and downward migration pairs. Downward migration files are optional; when there is no downward migration for the latest upward migration an error will occur when a downward migration is attempted.

All files in the migration-scripts directory are read, and files that do not have a .sql extension are ignored. Migrations are sorted by their ID prefix, and run consecutively based on their IDs.

Migration scripts can contain arbitrary SQL statements separated by semicolons. The SqlScriptParser class separates SQL statements in order to send them via PDO. It can handle the precedence between semicolons, single line comments, multi line comments and quoted strings. All SQL statements within a given script are run in a single database transaction in order to guarantee integrity.

This application uses very basic SQL that has been tested on MySQL and PostgreSQL. It should work with any SQL based database, but this has not been verified yet.

Once a migration script has been run it can be safely renamed, as long as the parsed ID part equals the original integer ID value when it was first run. If an upward migration script is deleted or the ID part is changed, it will have no effect as only the down migration will be needed in future. After downgrading past the deleted upward migration, future upward migrations will exclude the deleted file. Always add new migration scripts with a higher ID than the ID of the last script. The migration tool will only process new migrations if their ID is larger than the last migration ID that was run.

This class takes a configuration path when constructed. The configuration path must be a plain PHP file that returns a configuration array. The array must have this structure:

<?php

return [
    'basePath' => 'path-within-which-to-find-migration-scripts-directory',
    'connectionString' => 'pdo-database-connection-string',
    'userName' => 'optional-pdo-username',
    'password' => 'optional-pdo-password'
];

All versions of migrate with dependencies

PHP Build Version
Package Version
No informations.
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 diontruter/migrate contains the following files

Loading the files please wait ....