Aimeos + postgresql: boolean column type problem
Posted: 30 May 2018, 18:15
I followed the default aimeos symfony bundle installation.
Symfony version 3.4.11
Aimeos version: 2018.04
My config.yml is:
But when I want add admin user:
php bin/console aimeos:account --admin email@mycompany.zzz
I obtain the following error:
The same error occours when the initial process try to add demo data into the "fos_user" table (for the same field, enabled::boolean).
It seems a mysql vs postgresql compatibility problem. Did I forget something in doctrine configuration?
Thanks in advance
Symfony version 3.4.11
Aimeos version: 2018.04
My config.yml is:
Code: Select all
...
...
fos_user:
db_driver: orm
firewall_name: main
user_class: AppBundle\Entity\User
from_email:
address: email@mycompany.zzz
sender_name: 'My sender name'
...
...
doctrine:
dbal:
driver: %database_driver%
host: '%database_host%'
port: '%database_port%'
dbname: '%database_name%'
user: '%database_user%'
password: '%database_password%'
charset: UTF8
orm:
auto_generate_proxy_classes: '%kernel.debug%'
naming_strategy: doctrine.orm.naming_strategy.underscore
auto_mapping: true
...
...
aimeos_shop:
mshop:
customer:
manager:
name: FosUser
password:
name: Bcrypt
resource:
db:
adapter: pgsql
host: %database_host%
port: %database_port%
database: %database_name%
username: %database_user%
password: %database_password%
stmt: null
#stmt: ["SET NAMES 'utf8'", "SET SESSION sql_mode='ANSI'"]
#limit: 2
#opt-persistent: 0
php bin/console aimeos:account --admin email@mycompany.zzz
I obtain the following error:
Code: Select all
red@barbalbero:~/symfony/ecommerce$ php bin/console aimeos:account --admin email@mycompany.zzz
Password
In Simple.php line 97:
An exception occurred while executing '
INSERT INTO "fos_user" (
"siteid", "username_canonical", "username", "company", "vatid", "salutation", "title",
"firstname", "lastname", "address1", "address2", "address3",
"postal", "city", "state", "countryid", "langid", "telephone",
"email_canonical", "email", "telefax", "website", "longitude", "latitude",
"birthday", "enabled", "vdate", "password", "mtime", "editor", "roles", "salt",
"ctime"
) VALUES (
1,'email@mycompany.zzz','email@mycompany.zzz','','','','','','','','','','','','',NULL,NULL,'','email@mycompany.zzz','email@mycompany.zzz','','',NULL,NULL,NULL,1,NULL,'$2y$
10$XZUZul7qxTYvRgdyXcBJ8.B0InI2ujAHtmu//pogU96BCA8sgApzO','2018-05-30 19:57:40','aimeos:account','a:0:{}','','2018-05-30 19:57:40'
)
':
SQLSTATE[42804]: Datatype mismatch: 7 ERROR: column "enabled" is of type boolean but expression is of type integer
LINE 10: ...y.zzz','email@mycompany.zzz','','',NULL,NULL,NULL,1,NULL,'$2...
^
HINT: You will need to rewrite or cast the expression.
It seems a mysql vs postgresql compatibility problem. Did I forget something in doctrine configuration?
Thanks in advance