Download the PHP package fabiopaiva/pdo-simple-migration without Composer
On this page you can find all versions of the php package fabiopaiva/pdo-simple-migration. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download fabiopaiva/pdo-simple-migration
More information about fabiopaiva/pdo-simple-migration
Files in fabiopaiva/pdo-simple-migration
Package pdo-simple-migration
Short Description Database version control using PDO connection
License MIT
Informations about the package pdo-simple-migration
PDO Simple Migration
Simple migration is a minimalist tool to manage your database versioning.
Installation
composer require fabiopaiva/pdo-simple-migration

Configuration
This library tries to find a file called config.php in working directory with PDO setup, if file doesn't exist, you can send PDO parameters in command line.
config.php (optional)
table is the name of database table to control your versioning, migrations is default.
dir is the path where you want to store you migrations file.
Usage
Status
List current status of your migrations
vendor/bin/migration status

Generate
Generate a empty migration
vendor/bin/migration generate

Generated code example
Migrate
Migrate to latest version
vendor/bin/migration migrate

Execute
Execute specific migration version (up or down)
vendor/bin/migration execute version --up --down

Options
--dump
If --dump parameter is present, migration will only dump query in screen
--dsn and --username
If you don't want to create config.php file, you can send --dsn setup parameter.
If you send --dsn parameter, you need to send --username parameter too.
The prompt will ask your database password.
--dir
Directory where to save migrations classes, default migrations
--table
Table where to store migrations versioning history, default migrations
Issues
Please report issues to Github Issue Tracker
All versions of pdo-simple-migration with dependencies
ext-pdo Version *
symfony/console Version 3.*
zendframework/zend-code Version 2.*