PartKeepr\SetupBundle\Controller\SchemaMigrationSetupController::intMigrateSchemaAction PHP Method

intMigrateSchemaAction() public method

public intMigrateSchemaAction ( Request $request )
$request Symfony\Component\HttpFoundation\Request
    public function intMigrateSchemaAction(Request $request)
    {
        if (!$this->ensureAuthKey($request)) {
            return $this->getAuthKeyErrorResponse();
        }
        $response = ['success' => true, 'errors' => [], 'message' => 'Database schema successfully migrated'];
        $configuration = $this->getMigrationConfiguration();
        $migration = new Migration($configuration);
        $version = $configuration->getLatestVersion();
        $migration->migrate($version);
        return new JsonResponse($response);
    }