Last active
November 14, 2017 15:06
-
-
Save kevinmuller/62bfc622f1f3064c9de49041058a49a0 to your computer and use it in GitHub Desktop.
Example of migration script throwing an error while using markMigrated()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Migrations\AbstractMigration; | |
use Migrations\Migrations; | |
class MigrateTest extends AbstractMigration | |
{ | |
public function up() | |
{ | |
$migrations = new Migrations([ | |
'connection' => 'default' | |
]); | |
// Mark another migration file as migrated. | |
$migrations->markMigrated('20171114083934'); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Migrations\AbstractMigration; | |
class ToBeMarkedMigrated extends AbstractMigration | |
{ | |
public function up() | |
{ | |
// Nothing to do | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment