Skip to content

Commit

Permalink
Fix table name not being used and migration error (#36)
Browse files Browse the repository at this point in the history
* Fix table name not being used

The pennant config is using `stores` and same when creating driver in this file, however, when configuring database driver, it reads from `drivers` which is not found.

* Remove migration file registration

According to the docs, we were asked to run `php artisan vendor:publish --provider="Laravel\Pennant\PennantServiceProvider"` and the migration will be published to the base `database/migrations` directory.

And after that when we run `php artisan migrate`, both migration files will be ran and causes error.
  • Loading branch information
bankorh authored Feb 16, 2023
1 parent b9972c3 commit 7095aa1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion src/FeatureManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function createArrayDriver()
*/
public function createDatabaseDriver()
{
return with($this->container['config']->get('pennant.drivers.database'), function ($config) {
return with($this->container['config']->get('pennant.stores.database'), function ($config) {
return new DatabaseDriver(
$this->container['db']->connection($config['connection'] ?? null),
$this->container['events'],
Expand Down
2 changes: 0 additions & 2 deletions src/PennantServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ protected function listenForEvents()
*/
protected function offerPublishing()
{
$this->loadMigrationsFrom(__DIR__.'/../database/migrations');

$this->publishes([
__DIR__.'/../config/pennant.php' => config_path('pennant.php'),
], 'pennant-config');
Expand Down

0 comments on commit 7095aa1

Please sign in to comment.