Jump to content

interesting extension laravel-schema


Recommended Posts

Hello,  I found interesting extension https://packagist.org/packages/thedevsaddam/laravel-schema,but trying to use it with configuration in .env :
DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=5432
DB_DATABASE=wprods

... and several database connections in config/database.php:

'connections' => [
        ...   
        'pgsql' => [
            'driver' => 'pgsql',
            'host' => env('DB_HOST', '127.0.0.1'),
            'port' => env('DB_PORT', '5432'),
            'prefix' => 'pd_',
            ...
        ],

When I try to run commands from this extension I got :

#  php artisan schema:show                                                                                                 
  [Illuminate\Database\QueryException]                                                           
  SQLSTATE[42P01]: Undefined table: 7 ERROR:  relation "pd_foo" does not exist                   
  LINE 1: select count(*) as aggregate from "pd_foo"                                             
                                            ^ (SQL: select count(*) as aggregate from "pd_foo")

I my db there is no foo table and I did not find where is it from ? and

# php artisan schema:table --t=pd_doc
                                                                                                   
  [Illuminate\Database\QueryException]                                                              
  SQLSTATE[42P01]: Undefined table: 7 ERROR:  relation "pd_pd_doc" does not exist                   
  LINE 1: select count(*) as aggregate from "pd_pd_doc"                                             
                                            ^ (SQL: select count(*) as aggregate from "pd_pd_doc") 

# php artisan schema:table --t=doc
Table name is not correct!

In my db there is pd_doc table, but I got error...

Also if there is a way to see information on any databases, not only default?

 

Thanks!

Link to post
Share on other sites

Your table selection problems appear to be a bug in the extension. You could report it and see if the author will fix it for you.

 

You'd probably need multiple connections configured to show details for multiple databases. You can use --c to switch connections.

Link to post
Share on other sites
This thread is more than a year old.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.