PHP code example of maxim-oleinik / blade-migrations
1. Go to this page and download the library: Download maxim-oleinik/blade-migrations library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
maxim-oleinik / blade-migrations example snippets
$op = new \Blade\Migrations\Operation\StatusOperation($service);
$data = $op->getData();
$op = new \Blade\Migrations\Operation\RollbackOperation($service);
// Set logger for output
$op->setLogger(\Psr\Log\LoggerInterface $logger);
$op->setForce(bool);
/**
* @param $confirmationCallback - Function, which asks for a prompt and returns true/false
* @param $migrationId - Database migration ID
* @param $loadFromFile - Rollback migration with commands taken from migration file, not from DB (if saved version contains error)
*/
$op->run(callable $confirmationCallback($migrationTitle), $migrationId = null, $loadFromFile = false);
$op = new \Blade\Migrations\Operation\MakeOperation($repoFile)
$op->run($migrationFileName);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.