$migrationClassName =
sprintf('%s\\Migrations\\Migration%d',
$this->plugin->
getName(),
$result['1'
]);
if (!
class_exists($migrationClassName, false
)) { $file =
$migrationPath . '/' .
$result['0'
];
require $file;
} try { /** @var AbstractPluginMigration $migrationClass */
$migrationClass =
new $migrationClassName($this->
getConnection());
} catch (Exception
$e) { throw new Exception('Could not instantiate Object'
);
} $this->
validateMigration($migrationClass,
$result);
return $migrationClass;
} protected function insertMigration(AbstractMigration
$migration): void
{ $sql = 'REPLACE s_plugin_schema_version (plugin_name, version, start_date, name) VALUES (:plugin_name, :version, :date, :name)';
$stmt =
$this->connection->
prepare($sql);