|
@@ 17-26 (lines=10) @@
|
| 14 |
|
*/ |
| 15 |
|
protected $migrate = null; |
| 16 |
|
|
| 17 |
|
public function setUp() |
| 18 |
|
{ |
| 19 |
|
# Dump SQLite database. |
| 20 |
|
$this->prepareDatabase(); |
| 21 |
|
|
| 22 |
|
$uri = new \ByJG\Util\Uri("sqlite://{$this->path}"); |
| 23 |
|
$this->migrate = new \ByJG\DbMigration\Migration($uri, __DIR__ . '/../example/sqlite', true, $this->migrationTable); |
| 24 |
|
$this->migrate->registerDatabase("sqlite", \ByJG\DbMigration\Database\SqliteDatabase::class); |
| 25 |
|
parent::setUp(); |
| 26 |
|
} |
| 27 |
|
|
| 28 |
|
public function testUsingCustomTable() |
| 29 |
|
{ |
|
@@ 28-39 (lines=12) @@
|
| 25 |
|
parent::setUp(); |
| 26 |
|
} |
| 27 |
|
|
| 28 |
|
public function testUsingCustomTable() |
| 29 |
|
{ |
| 30 |
|
$this->migrationTable = 'migration_table'; |
| 31 |
|
|
| 32 |
|
$this->prepareDatabase(); |
| 33 |
|
|
| 34 |
|
$uri = new \ByJG\Util\Uri("sqlite://{$this->path}"); |
| 35 |
|
$this->migrate = new \ByJG\DbMigration\Migration($uri, __DIR__ . '/../example/sqlite', true, $this->migrationTable); |
| 36 |
|
$this->migrate->registerDatabase("sqlite", \ByJG\DbMigration\Database\SqliteDatabase::class); |
| 37 |
|
|
| 38 |
|
parent::testUpVersion1(); |
| 39 |
|
} |
| 40 |
|
|
| 41 |
|
protected function prepareDatabase() { |
| 42 |
|
if ($this->path != ":memory:") { |