コード例 #1
0
ファイル: test_sqlite.php プロジェクト: byjg/migration
<?php

require "../../vendor/autoload.php";
$connection = new \ByJG\AnyDataset\ConnectionManagement('sqlite:///tmp/teste.sqlite');
$migration = new \ByJG\DbMigration\Migration($connection, '.');
$migration->reset();
コード例 #2
0
ファイル: test_mysql.php プロジェクト: byjg/migration
<?php

require "../../vendor/autoload.php";
/**
 * Make sure you have a database with the user 'migrateuser' and password 'migratepwd'
 * 
 * This user need to have grant for DDL commands; 
 */
$connection = new \ByJG\AnyDataset\ConnectionManagement('mysql://*****:*****@localhost/migratedatabase');
$migration = new \ByJG\DbMigration\Migration($connection, '.');
$migration->prepareEnvironment();
$migration->reset();