Jump to content
mstdmstdd

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!

Share this post


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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

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.