Open khleung opened 3 years ago
I made the following changes and uepg/laravel-sybase plugins and it works now
Change in vendor/uepg/laravel-sybase/src/Database/Connection.php
diff vendor/uepg/laravel-sybase/src/Database/Connection_old.php vendor/uepg/laravel-sybase/src/Database/Connection.php 8a9
use Illuminate\Database\Schema\Builder as SchemaBuilder; 802c803 <
837c838 < * @return \Illuminate\Database\Query\Builder
* @return \Illuminate\Database\Schema\Builder
845c846 < $builder = new Builder($this);
$builder = new SchemaBuilder($this);
Change in /vendor/uepg/laravel-sybase/src/Database/Schema/Grammar.php Line 5
Before : <?php
namespace Uepg\LaravelSybase\Database\Schema;
use Uepg\LaravelSybase\Support\Fluent; use Uepg\LaravelSybase\Database\Schema\Blueprint; use Illuminate\Database\Schema\Grammars\Grammar as IlluminateGrammar;
After : <?php
namespace Uepg\LaravelSybase\Database\Schema;
//use Uepg\LaravelSybase\Support\Fluent; use Illuminate\Support\Fluent; use Uepg\LaravelSybase\Database\Schema\Blueprint; use Illuminate\Database\Schema\Grammars\Grammar as IlluminateGrammar;
Before : /**
After : /**
My existing Laravel 5.7 + laravel-sybase project works very well with a SAP ASE 16.0.x database connectivity
On the same machine, I just created a new Laravel project and applied laravel-sybase with the guidelines given. $ php artisan -v Laravel Framework 7.26.1
$ php artisan migrate -v
BadMethodCallException
Call to undefined method Illuminate\Database\Query\Builder::blueprintResolver()
at vendor/laravel/framework/src/Illuminate/Support/Traits/ForwardsCalls.php:50 46| @throws \BadMethodCallException 47| / 48| protected static function throwBadMethodCallException($method) 49| {
• Bad Method Call: Did you mean Illuminate\Database\Query\Builder::useWritePdo() ?
1 vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:3222 Illuminate\Database\Query\Builder::throwBadMethodCallException("blueprintResolver")
2 vendor/uepg/laravel-sybase/src/Database/Connection.php:849 Illuminate\Database\Query\Builder::__call("blueprintResolver")
3 vendor/laravel/framework/src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php:167 Uepg\LaravelSybase\Database\Connection::getSchemaBuilder()
4 vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:608 Illuminate\Database\Migrations\DatabaseMigrationRepository::repositoryExists()
5 vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php:93 Illuminate\Database\Migrations\Migrator::repositoryExists()
6 vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php:64
I have no idea to fix it . please advise.