Open sajaddp opened 2 years ago
Hi @sajaddp Can you post your config at all? On one side you've said you set the prefix but then also removed it?
Hi @alecritson,
### config/getcandy/database.php
'table_prefix' => '',
### config/databse.php
'pgsql' => [
'driver' => 'pgsql',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '5432'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => 'vss_', ## <---- here
'prefix_indexes' => true,
'search_path' => 'public',
'sslmode' => 'prefer',
],
Thanks @sajaddp It looks like Laravel isn't considering this prefix when you manually have to set the table names. I'll try and have a look to see if I can find a solution :)
Had another look at this and it might run a little deeper than first thought, will have a chat with @glennjacobs when he's back in!
any news? i have the same problem using database prefix on function: getCustomerGroupOrdersProperty
for this issue, there are 2 approach to it
$table = Lunar\Facades\DB::connection()->table((new OrderAddress))
// this approach will use the database connection prefix in config/database.php
2. set the table_prefix config in lunar
this let us continue to use `->getTable()`
problem: setting prefix in both files likely causing issue with migration where it will ends up with `{prefix}{prefix}table_name`
Hi, I set the prefix for the database. I also removed the prefix for
getcandy
tables in the config file. An error occurs while running theadmin
. The error is related to the incorrect table name.As you can see, the error is related to the wrong name in Table
order_addresses
, which is generated in the getReturningCustomersPercentProperty function.