Description

There are two separate inconsistencies between MySQL and PostgreSQL schema definitions of eznotification table related to is_pending and data columns.

The schema table definitions are as follows:

MySQL

CREATETABLE `eznotification` (

`id` int(11) unsigned NOTNULL AUTO_INCREMENT,

`owner_id` int(11) NOTNULLDEFAULT 0,

`is_pending` tinyint(1) NOTNULLDEFAULT'1',

`type` varchar(128) NOTNULLDEFAULT'',

`created` int(11) NOTNULLDEFAULT 0,

`data` text,

PRIMARYKEY (`id`),

KEY `eznotification_owner` (`owner_id`),

KEY `eznotification_owner_is_pending` (`owner_id`, `is_pending`)

) ENGINE=InnoDB DEFAULT CHARSET=utf8;

PostgreSQL

CREATETABLE eznotification (

id SERIAL,

owner_id integerDEFAULT 0 NOTNULL ,

is_pending integerDEFAULT 1 NOTNULL,

type charactervarying(128) NOTNULL,

created integerDEFAULT 0 NOTNULL,

data text

);

The is_pending column has tinyint(1) and integer data types for MySQL and PostgreSQL respectively. Doctrine Schema Tool transforms tinyint(1) to boolean, therefore this should be uniform data type. It's important for PostgreSQL because of strict type comparison in queries, which means Gateway code needs to be adjusted.

The data column has blob and text data types for MySQL and PostgreSQL respectively. The internal stored format is JSON, so the correct data type for this column should be text (also easier to fix, because PostgreSQL Doctrine driver returns blobs as data streams).

Issue Links

blocks

EZP-29938As a Maintainer I want to install eZ Platform OSS on PostgreSQL database