Setup db error

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
kuoyehs
Posts: 22
Joined: 09 Sep 2019, 03:01

Setup db error

Post by kuoyehs » 16 Oct 2019, 09:37

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

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Setup db error

Post by aimeos » 17 Oct 2019, 07:38

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
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

kuoyehs
Posts: 22
Joined: 09 Sep 2019, 03:01

Re: Setup db error

Post by kuoyehs » 17 Oct 2019, 10:30

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',
),

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Setup db error

Post by aimeos » 19 Oct 2019, 17:22

Try "exclude", not "exlcude"
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

kuoyehs
Posts: 22
Joined: 09 Sep 2019, 03:01

Re: Setup db error

Post by kuoyehs » 21 Oct 2019, 02:27

Your document is 'exlcude'.
Image

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Setup db error

Post by aimeos » 21 Oct 2019, 06:45

That was a spelling error which has been corrected now. Thanks for mentioning!
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply