UPGRADE from 2020.10 to 2021.04 in PostgreSQL

Help for integrating the Laravel package
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!
mahmoud
Posts: 27
Joined: 27 Mar 2020, 22:01

UPGRADE from 2020.10 to 2021.04 in PostgreSQL

Post by mahmoud » 18 Apr 2021, 12:53

Hello,
windows 10: 64
PostgreSQL 9.6.15
Laravel Framework 8.37.0
PHP 7.4.16
"php": "^7.3|^8.0",
"aimeos/aimeos-laravel": "~2021.04",


my first database (created by 2020.10) contains my data, I want to update to the latest version I followed the following steps:
  • I created a new empty database and installed in last version, it works.
  • but when I change the connection to the first database and run the following commands:

Code: Select all

 php artisan config:cache ;php artisan cache:clear ; php artisan aimeos:clear
and

Code: Select all

php ./artisan aimeos:setup
php ./artisan route:clear
php ./artisan view:clear
php ./artisan aimeos:clear
----
it displays the following errors:

Image
and in the log file:
Image
we notice that the table "mshop_rule" is not created and other columns ...

NB: i solved other error by :

Code: Select all

alter table mshop_locale_site DROP  CONSTRAINT     mshop_locale_site_siteid_key CASCADE
DROP TABLE users CASCADE;
directly in the database .

Thank you so much!
Attachments
Sans titre.png
Sans titre.png (47.82 KiB) Viewed 1042 times
log.png
log.png (85.35 KiB) Viewed 1042 times

mahmoud
Posts: 27
Joined: 27 Mar 2020, 22:01

Re: UPGRADE from 2020.10 to 2021.04 in PostgreSQL

Post by mahmoud » 20 Apr 2021, 11:13

Hello,
in this file : vendor\aimeos\aimeos-core\lib\mshoplib\setup\OrderMigrateProductSupplier.php
why it is two lines

Code: Select all

$table->addColumn( 'supplierid', 'string', ['length' => 36, 'customSchemaOptions' => ['charset' => 'binary', 'default' => '']] );
$table->addColumn( 'suppliername', 'string', ['length' => 255, 'default' => ''] );
since these two lines are already in the file
vendor\aimeos\aimeos-core\lib\mshoplib\setup\default\schema\order.php

Code: Select all

			$table->addColumn( 'supplierid', 'string', array( 'length' => 36, 'customSchemaOptions' => ['charset' => 'binary', 'default' => ''] ) );
			$table->addColumn( 'suppliername', 'string', array( 'length' => 255, 'default' => '' ) );
when I delete these files the setup works through and hangs in the

Code: Select all

Aimeos\MW\DB\Exception 

  SQLSTATE[42601]: Syntax error: 7 ERREUR:  erreur de syntaxe sur ou près de « ON »
LINE 1: DROP INDEX "unq_mssto_sid_pcode_ty" ON "mshop_stock"
                                            ^: DROP INDEX "unq_mssto_sid_pcode_ty" ON "mshop_stock"
thank you
Attachments
error.png
error.png (21.03 KiB) Viewed 1012 times

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

Re: UPGRADE from 2020.10 to 2021.04 in PostgreSQL

Post by aimeos » 21 Apr 2021, 06:38

mahmoud wrote: 20 Apr 2021, 11:13 Hello,
in this file : vendor\aimeos\aimeos-core\lib\mshoplib\setup\OrderMigrateProductSupplier.php
why it is two lines

Code: Select all

$table->addColumn( 'supplierid', 'string', ['length' => 36, 'customSchemaOptions' => ['charset' => 'binary', 'default' => '']] );
$table->addColumn( 'suppliername', 'string', ['length' => 255, 'default' => ''] );
since these two lines are already in the file
vendor\aimeos\aimeos-core\lib\mshoplib\setup\default\schema\order.php

Code: Select all

			$table->addColumn( 'supplierid', 'string', array( 'length' => 36, 'customSchemaOptions' => ['charset' => 'binary', 'default' => ''] ) );
			$table->addColumn( 'suppliername', 'string', array( 'length' => 255, 'default' => '' ) );
What's the error message when you update?
mahmoud wrote: 20 Apr 2021, 11:13 SQLSTATE[42601]: Syntax error: 7 ERREUR: erreur de syntaxe sur ou près de « ON »
LINE 1: DROP INDEX "unq_mssto_sid_pcode_ty" ON "mshop_stock"
^: DROP INDEX "unq_mssto_sid_pcode_ty" ON "mshop_stock"[/code]
Can you please create an issue in the https://github.com/aimeos/aimeos-core Github repository?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply