Skip to content

Instantly share code, notes, and snippets.

@kevinmuller
Last active November 14, 2017 15:06
Show Gist options
  • Save kevinmuller/62bfc622f1f3064c9de49041058a49a0 to your computer and use it in GitHub Desktop.
Save kevinmuller/62bfc622f1f3064c9de49041058a49a0 to your computer and use it in GitHub Desktop.
Example of migration script throwing an error while using markMigrated()
<?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');
}
}
<?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