Skip to content
This repository has been archived by the owner on Aug 2, 2024. It is now read-only.

[BUG] Custom Database Connection Name #139

Open
fauzie opened this issue Jul 26, 2021 · 1 comment
Open

[BUG] Custom Database Connection Name #139

fauzie opened this issue Jul 26, 2021 · 1 comment
Assignees

Comments

@fauzie
Copy link

fauzie commented Jul 26, 2021

Describe the bug
Not support with custom connection name that difference from driver name. e.g: in config database.php i am using connections with name defaultdb and driver using mysql

To Reproduce
Assume you are using mysql database. Steps to reproduce the behavior:

  1. Edit 'config/database.php' edit in connection array key with driver mysql to other than mysql. eg:
    'connections' => [
        'mydb' => [
              'driver' => 'mysql'
              .....
  1. Leave the config/prequel.php as is
  2. Open prequel on browser
  3. Error with Exception Selected invalid or unsupported database driver

Next try i change my config path prequel.database.connection to mydb, same like on database config
Open prequel on browser, and is still error with message:

Your database connection might not be supported yet, currently supported: 'mysql', 'pgsql'. (Yours is: 'mydb').

Expected behavior
Prequel database config must follow the configuration from the database config, and make the connection details such as host, port, database, username, password is optional in the prequel config, just store the connection name on prequel config, and follow the rest from database config.

Screenshots
https://ibb.co/9WMmwfz
https://ibb.co/8M02W7d

PHP Version

  • Version : 8.0.8

Database type

  • Type : mysql
  • Version : 10.5.11-MariaDB

Desktop (please complete the following information):

  • Browser : Chrome
  • Version : 92.0.4515.107
@QuintenJustus
Copy link
Member

Hey @fauzie, thanks for submitting this bug! Very sorry about the very late answer. Prequel is going back in to active development and a v2.0 is being developed right now (see #156). I will fix this in that release.

Hope you haven't been discouraged from using Prequel because of this! I'll keep this issue open until the fix is in the aforementioned PR.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants