PHP code example of fabiopaiva / pdo-simple-migration
1. Go to this page and download the library: Download fabiopaiva/pdo-simple-migration 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/ */
fabiopaiva / pdo-simple-migration example snippets
php
return [
'db' => [
'dsn' => 'mysql:host=localhost;dbname=myDb;port=3306;charset=UTF8',
'username' => 'root',
'password' => 'pass',
],
'table' => 'migrations',
'dir' => 'migrations'
];
php
namespace PDOSimpleMigration\Migrations;
use PDOSimpleMigration\Library\AbstractMigration;
class Version20160128130854 extends AbstractMigration
{
public static $description = "Migration description";
public function up()
{
//$this->addSql(/*Sql instruction*/);
}
public function down()
{
//$this->addSql(/*Sql instruction*/);
}
}