Aimeos mysql requirements
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
-
- Expert
- Posts: 274
- Joined: 27 Jun 2019, 16:19
Aimeos mysql requirements
Good evening, I got problem
Aimeos version is:
MySQL:
The problem is when I execute artisan aimeos:setup, error text is:
It is very important for me. Please, tell me if I have chance to make it work on MySQL 5.6.21 ? Or it is crazy and I have to rename a lot of indexes and it affects a lot of points ?
Thank you very much !
Aimeos version is:
Code: Select all
aimeos/ai-laravel 2019.10.1
Code: Select all
mysqld Ver 5.6.21 for Linux on i686 (Source distribution)
The problem is when I execute artisan aimeos:setup, error text is:
Code: Select all
Aimeos\MW\DB\Exception : SQLSTATE[HY000]: General error: 1709 Index column size too large. The maximum column size is 767 bytes.: CREATE TABLE mshop_locale_site (id INT AUTO_INCREMENT NOT NULL, parentid INT NOT NULL, code VARCHAR(255) NOT NULL, `label` VARCHAR(255) NOT NULL, config TEXT NOT NULL, level SMALLINT NOT NULL, nleft INT NOT NULL, nright INT NOT NULL, status SMALLINT NOT NULL, mtime DATETIME NOT NULL, ctime DATETIME NOT NULL, editor VARCHAR(255) NOT NULL, UNIQUE INDEX unq_mslocsi_code (code), INDEX idx_mslocsi_nlt_nrt_lvl_pid (nleft, nright, level, parentid), INDEX idx_mslocsi_level_status (level, status), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB
at /kunden/527257_50389/webseiten/vendor/aimeos/aimeos-core/lib/mwlib/src/MW/DB/Statement/DBAL/Simple.php:94
90|
91| try {
92| $result = $this->exec();
93| } catch( \PDOException $e ) {
> 94| throw new \Aimeos\MW\DB\Exception( $e->getMessage() . ': ' . $this->sql, $e->getCode() );
95| }
96|
97| return new \Aimeos\MW\DB\Result\PDO( $result );
98| }
Exception trace:
1 Aimeos\MW\DB\Statement\DBAL\Simple::execute()
/kunden/527257_50389/webseiten/vendor/aimeos/aimeos-core/lib/mwlib/src/MW/Setup/Task/Base.php:177
2 Aimeos\MW\Setup\Task\Base::executeList("db-locale")
/kunden/527257_50389/webseiten/vendor/aimeos/aimeos-core/lib/mshoplib/setup/TablesCreateMShop.php:197
It is very important for me. Please, tell me if I have chance to make it work on MySQL 5.6.21 ? Or it is crazy and I have to rename a lot of indexes and it affects a lot of points ?
Thank you very much !
Re: Aimeos mysql requirements
Please read: https://github.com/aimeos/aimeos-laravel#database
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
-
- Expert
- Posts: 274
- Joined: 27 Jun 2019, 16:19
Re: Aimeos mysql requirements
Oh sorry, I have not checked documentation carefully. But now another problem, when I executed aimeos:setup
But users table exists, I executed artisan migrate before it
Code: Select all
Doctrine\DBAL\Schema\SchemaException : There is no table with name 'db527257_4.users' in the schema.
at /kunden/527257_50389/webseiten/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/SchemaException.php:30
26| * @return \Doctrine\DBAL\Schema\SchemaException
27| */
28| public static function tableDoesNotExist($tableName)
29| {
> 30| return new self("There is no table with name '" . $tableName . "' in the schema.", self::TABLE_DOESNT_EXIST);
31| }
32|
33| /**
34| * @param string $indexName
Exception trace:
1 Doctrine\DBAL\Schema\SchemaException::tableDoesNotExist("db527257_4.users")
/kunden/527257_50389/webseiten/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Schema.php:168
2 Doctrine\DBAL\Schema\Schema::getTable("db527257_4.users")
/kunden/527257_50389/webseiten/ext/labor/lib/custom/setup/default/schema/customer.php:13
3 Aimeos\MW\Setup\Task\TablesCreateMShop::{closure}(Object(Doctrine\DBAL\Schema\Schema))
/kunden/527257_50389/webseiten/vendor/aimeos/aimeos-core/lib/mshoplib/setup/TablesCreateMShop.php:153
4 Aimeos\MW\Setup\Task\TablesCreateMShop::getSchemaObjects("table", "default/schema/customer.php", Object(Doctrine\DBAL\Schema\SchemaConfig))
/kunden/527257_50389/webseiten/vendor/aimeos/aimeos-core/lib/mshoplib/setup/TablesCreateMShop.php:186
5 Aimeos\MW\Setup\Task\TablesCreateMShop::setupSchema()
/kunden/527257_50389/webseiten/vendor/aimeos/aimeos-core/lib/mshoplib/setup/TablesCreateMShop.php:107
6 Aimeos\MW\Setup\Task\TablesCreateMShop::migrate()
/kunden/527257_50389/webseiten/vendor/aimeos/aimeos-core/lib/mwlib/src/MW/Setup/Manager/Multiple.php:177
7 Aimeos\MW\Setup\Manager\Multiple::migrateTasks()
/kunden/527257_50389/webseiten/vendor/aimeos/aimeos-core/lib/mwlib/src/MW/Setup/Manager/Multiple.php:173
8 Aimeos\MW\Setup\Manager\Multiple::migrateTasks()
/kunden/527257_50389/webseiten/vendor/aimeos/aimeos-core/lib/mwlib/src/MW/Setup/Manager/Multiple.php:98
9 Aimeos\MW\Setup\Manager\Multiple::migrate(Object(Aimeos\MW\Setup\Task\TablesCreateMAdmin))
/kunden/527257_50389/webseiten/vendor/aimeos/aimeos-laravel/src/Aimeos/Shop/Command/SetupCommand.php:78
10 Aimeos\Shop\Command\SetupCommand::handle()
/kunden/527257_50389/webseiten/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:32
11 call_user_func_array([])
/kunden/527257_50389/webseiten/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:32
12 Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
/kunden/527257_50389/webseiten/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:90
13 Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Object(Closure))
/kunden/527257_50389/webseiten/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:34
14 Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), [])
/kunden/527257_50389/webseiten/vendor/laravel/framework/src/Illuminate/Container/Container.php:576
15 Illuminate\Container\Container::call()
/kunden/527257_50389/webseiten/vendor/laravel/framework/src/Illuminate/Console/Command.php:183
16 Illuminate\Console\Command::execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
/kunden/527257_50389/webseiten/vendor/symfony/console/Command/Command.php:255
17 Symfony\Component\Console\Command\Command::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
/kunden/527257_50389/webseiten/vendor/laravel/framework/src/Illuminate/Console/Command.php:170
18 Illuminate\Console\Command::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
/kunden/527257_50389/webseiten/vendor/symfony/console/Application.php:934
19 Symfony\Component\Console\Application::doRunCommand(Object(Aimeos\Shop\Command\SetupCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
/kunden/527257_50389/webseiten/vendor/symfony/console/Application.php:273
20 Symfony\Component\Console\Application::doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
/kunden/527257_50389/webseiten/vendor/symfony/console/Application.php:149
21 Symfony\Component\Console\Application::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
/kunden/527257_50389/webseiten/vendor/laravel/framework/src/Illuminate/Console/Application.php:90
22 Illuminate\Console\Application::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
/kunden/527257_50389/webseiten/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:133
23 Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
/kunden/527257_50389/webseiten/artisan:37
But users table exists, I executed artisan migrate before it
-
- Expert
- Posts: 274
- Joined: 27 Jun 2019, 16:19
Re: Aimeos mysql requirements
it is on live server with mysql 5.6.. But on my local it works, code the same..
-
- Expert
- Posts: 274
- Joined: 27 Jun 2019, 16:19
Re: Aimeos mysql requirements
This is from ext/labor/lib/custom/setup/default/schema/customer.php :
But it works on other environments.. May it be because of mysql version.. ? sounds stupid
Code: Select all
return array(
'table' => array(
'users' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
$table = $schema->getTable( 'users' );
$table->addColumn('id_customer', 'bigint')->setUnsigned(true)->setNotnull(false);
$table->addColumn('id_customer_ref', 'bigint')->setUnsigned(true)->setNotnull(false);
$table->addColumn('cellphone', 'string')->setDefault('')->setLength(32);
$table->addColumn('bic', 'string')->setDefault('')->setLength(200);
$table->addColumn('bank', 'string')->setDefault('')->setLength(200);
$table->addColumn('iban', 'string')->setDefault('')->setLength(30);
$table->addColumn('payment_id', 'smallint')->setNotnull(false);
$table->addColumn('values', 'string')->setDefault('')->setLength(200); // show near name in downline
$table->addColumn('postal_number', 'string')->setDefault('')->setLength(200);
$table->addColumn('postal_station', 'string')->setDefault('')->setLength(200);
$table->addColumn('discount', 'float')->setDefault(0);
$table->addColumn('discount_from', 'float')->setDefault(0); //date from
$table->addColumn('discount_to', 'float')->setDefault(0); //date_to
$table->addColumn('discount_type', 'smallint')->setNotnull(false)->setUnsigned(true);
$table->addColumn('fair_code', 'integer')->setNotnull(false);
$table->addColumn('price_group', 'smallint')->setNotnull(false)->setUnsigned(true);
$table->dropColumn('birthday');
$table->addColumn('birthday', 'integer')->setNotnull(false);
$table->addColumn('sales_tax', 'float')->setDefault(0);
$table->addUniqueIndex(['id_customer'], 'unq_lvusr_idcustomer' );
return $schema;
},
),
);
-
- Expert
- Posts: 274
- Joined: 27 Jun 2019, 16:19
Re: Aimeos mysql requirements
'ai-laravel' added to manifest solved the problem. But why it worked on other environments I don't know )
Re: Aimeos mysql requirements
If you don't add the dependencies correctly, the order of execution will be random. Thus the order used locally worked but on the server a different order was used and failed.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star