Page 1 of 1

Setup db error

Posted: 16 Oct 2019, 09:37
by kuoyehs
My project install aimeos package, and database use postgresSQL.

Code: Select all

"aimeos/aimeos-laravel": "2019.07.x-dev",
"aimeos/ai-filesystem": "2019.07.x-dev",
"aimeos/ai-payments": "2019.07.x-dev",
"aimeos/ai-client-html": "2019.07.x-dev",
"aimeos/aimeos-core": "2019.07.x-dev"
I use two database to let aimeos and my project old users table merge.

Code: Select all

'resource' => [
	'db' => [
            'adapter' => env('DB_CONNECTION', 'pgsql'),
            'host' => env('DB_HOST', '127.0.0.1'),
            'port' => env('DB_PORT', '5432'),
            'socket' => '',
            'database' => env('DB_DATABASE_SHOP', 'forge'),
            'username' => env('DB_USERNAME', 'forge'),
            'password' => env('DB_PASSWORD', ''),
            'stmt' => [],
            'limit' => 3, // maximum number of concurrent database connections
            'defaultTableOptions' => [
                'charset' => 'utf8',
                'collate' => '',
            ],
        ],
        'db-customer' => [
            'adapter' => env('DB_CONNECTION', 'pgsql'),
            'host' => env('DB_HOST', '127.0.0.1'),
            'port' => env('DB_PORT', '5432'),
            'socket' => '',
            'database' => env('DB_DATABASE', 'forge'),
            'username' => env('DB_USERNAME', 'forge'),
            'password' => env('DB_PASSWORD', ''),
            'stmt' => [],
            'limit' => 3, // maximum number of concurrent database connections
            'defaultTableOptions' => [
                'charset' => 'utf8',
                'collate' => '',
            ],
       ],
],
When I run "php artisan aimeos:setup --option=setup/default/demo:1", and have the error message.

Image

Re: Setup db error

Posted: 17 Oct 2019, 07:38
by aimeos
The database defined in your "db-customer" connection seems to contain your existing and modified "users" table and DBAL tries to remove an index what doesn't exist in the schema definition for "users". Please create an additional schema for "users" in your own Aimeos extension and add that index and the contstraint there so DBAL won't try to remove them any more:
https://aimeos.org/docs/Developers/Libr ... ing_tables

Re: Setup db error

Posted: 17 Oct 2019, 10:30
by kuoyehs
I try to add code in ai-laravel extension lib/custom/setup/default/schema/customer.php, but still have error.

Code: Select all

'exlcude' => array(
	'unq_api_token',
),
or

Code: Select all

'exlcude' => array(
	'api_token',
),
or

Code: Select all

'exlcude' => array(
	'unq_lvusr_api_token',
),
or

Code: Select all

'exlcude' => array(
	'users_api_token_unique',
),

Re: Setup db error

Posted: 19 Oct 2019, 17:22
by aimeos
Try "exclude", not "exlcude"

Re: Setup db error

Posted: 21 Oct 2019, 02:27
by kuoyehs
Your document is 'exlcude'.
Image

Re: Setup db error

Posted: 21 Oct 2019, 06:45
by aimeos
That was a spelling error which has been corrected now. Thanks for mentioning!