When using the Database feature, since it's hard coded the query to select all tables and other specific MySQL queries it crashes when using sqlite driver.
SQLSTATE[HY000]: General error: 1 near "SHOW": syntax error (SQL: SHOW TABLES) (View: /Users/afsardo/Code/.../vendor/tcg/voyager/src/views/tools/database/index.blade.php)
So since i am really in love with this package (seriously it's awesome <3) i will try and add compatibility to all major database drivers.
For PostgreSQL (#10) it would be something like
SELECT table_name FROM information_schema.tables WHERE table_type = 'BASE TABLE' AND table_schema = 'public'
that'll force me to edit vendor files. i'm in a situtation where i can't edit vendor files when i deploy. to be precise, i'm deploying my app using bluemix and everytime i use "cf push" to deploy my app, it does a composer install so editing vendor files is not an option.
i was thinking, maybe we could specify in the config/voyager.php what db we're using and that'll dynamically change the DB::select in the src/views/tools/database/index.blade.php?
That's the PR i sent, #31.
It detects the database driver you are using and resolves the "query" on it's own.
All the view needs is DBSchema::tables() (to show all tables).
Still in the process of implementing it for all the other needed methods.
Is this resolved now, since the merge of the PR #31?
This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group.
Most helpful comment
That's the PR i sent, #31.
It detects the database driver you are using and resolves the "query" on it's own.
All the view needs is
DBSchema::tables()(to show all tables).Still in the process of implementing it for all the other needed methods.