Details
-
Bug
-
Resolution: Fixed
-
Low
-
None
-
None
-
eZ Publish 4.7
eZ XML Export extension 1.5.0
Description
While running Upgrade check->Check database consistency on fresh eZ Publish 4.7 installation with eZXMLExport 1.5.0, eZ Publish reports inconsistency in database and gives following advices:
The database is not consistent with the distribution database. To synchronize your database with the distribution setup, run the following SQL commands: ALTER TABLE ezxport_available_cclass_attr ADD INDEX fk_contentclassattribute_id ( contentclass_id ); ALTER TABLE ezxport_exports CHANGE COLUMN compression compression int(1) NOT NULL DEFAULT '0'; ALTER TABLE ezxport_exports CHANGE COLUMN export_from_last export_from_last int(1) NOT NULL DEFAULT '0'; ALTER TABLE ezxport_exports CHANGE COLUMN export_hidden_nodes export_hidden_nodes int(1) NOT NULL DEFAULT '0'; ALTER TABLE ezxport_exports CHANGE COLUMN export_schedule export_schedule varchar(100) NOT NULL DEFAULT '0'; ALTER TABLE ezxport_exports CHANGE COLUMN ftp_target ftp_target varchar(200) NOT NULL DEFAULT 'false'; ALTER TABLE ezxport_exports CHANGE COLUMN related_object_handling related_object_handling int(1) NOT NULL DEFAULT '0'; ALTER TABLE ezxport_exports CHANGE COLUMN xslt_file xslt_file varchar(70) DEFAULT ''; ALTER TABLE ezxport_exports ADD INDEX fk_customers ( customer_id ); DROP TABLE ez_ct_change_entry; DROP TABLE ez_ct_change_log;
In fact, when looking into extension/ezxmlexport/share/db_schema.dba and extension/ezxmlexport/sql/mysql/schema.sql we can see that definisions are not in sync.
db_schema:
... 144 'ezxport_exports' => 145 array ( 146 'name' => 'ezxport_exports', 147 'fields' => 148 array ( 149 'compression' => 150 array ( 151 'length' => 1, 152 'type' => 'int', 153 'not_null' => '1', 154 'default' => '0', 155 ), ... 177 'export_from_last' => 178 array ( 179 'length' => 1, 180 'type' => 'int', 181 'not_null' => '1', 182 'default' => '0', 183 ), 184 'export_hidden_nodes' => 185 array ( 186 'length' => 1, 187 'type' => 'int', 188 'not_null' => '1', 189 'default' => '0', 190 ), ... 198 'export_schedule' => 199 array ( 200 'length' => 100, 201 'type' => 'varchar', 202 'not_null' => '1', 203 'default' => '0', 204 ), 205 'ftp_target' => 206 array ( 207 'length' => 200, 208 'type' => 'varchar', 209 'not_null' => '1', 210 'default' => 'false', 211 ), ... 224 'related_object_handling' => 225 array ( 226 'length' => 1, 227 'type' => 'int', 228 'not_null' => '1', 229 'default' => '0', 230 ), ... 251 'xslt_file' => 252 array ( 253 'length' => 70, 254 'type' => 'varchar', 255 'not_null' => '0', 256 'default' => '', 257 ), ...269 'fk_customers' => 270 array ( 271 'type' => 'non-unique', 272 'fields' => 273 array ( 274 0 => 'customer_id', 275 ), 276 ), 277 ), 278 ), ...
schema.sql:
26 CREATE TABLE ezxport_exports ( 27 id int(11) NOT NULL AUTO_INCREMENT, 28 customer_id int(11) NOT NULL, 29 `name` varchar(200) NOT NULL, 30 description varchar(200) NOT NULL, 31 sources text NOT NULL, 32 ftp_target varchar(200) NOT NULL, 33 slicing_mode CHAR(1) NOT NULL DEFAULT '1', 34 start_date varchar(15) NOT NULL DEFAULT '0', 35 end_date varchar(15) NOT NULL DEFAULT '0', 36 export_schedule varchar(100) NOT NULL, 37 export_limit int(11) NOT NULL, 38 export_from_last tinyint(4) NOT NULL DEFAULT '0', 39 compression tinyint(4) NOT NULL, 40 related_object_handling tinyint(4) NOT NULL, 41 xslt_file varchar(70) NOT NULL, 42 export_hidden_nodes tinyint(4) NOT NULL DEFAULT '0', 43 PRIMARY KEY (id) 44 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Steps to reproduce
1. Install eZPublish 4.7
2. Install eZXMLExport extension 1.5.0
3. Run database consistency test at http://yourdomain/youradminsiteaccess/setup/systemupgrade