Pierre Déchanoz
|
Monday 12 April 2010 5:38:13 am
in the script of upgrading :
"ALTER TABLE ezcontentclass_attribute ADD COLUMN serialized_data_text character; ALTER TABLE ezcontentclass_attribute ADD COLUMN serialized_description_list character;" In a new installation the table description is :
serialized_data_text text, serialized_description_list text, there is a big problem when i try to edit a class : "INSERT INTO ezcontentclass_attribute (id, serialized_name_list, serialized_description_list, version, contentclass_id, identifier, placement, is_searchable, is_required, can_translate, is_information_collector, data_type_string, data_int1, data_int2, data_int3, data_int4, data_float1, data_float2, data_float3, data_float4, data_text1, data_text2, data_text3, data_text4, data_text5, serialized_data_text, category) VALUES(376, 'a:2:{s:16:"always-available";s:6:"fre-FR";s:6:"fre-FR";s:8:"Sommaire";}', 'a:2:{s:6:"fre-FR";s:0:"";s:16:"always-available";s:6:"fre-FR";}', 1, 48, 'intro', 4, 1, 1, 1, 0, 'ezxmltext', 10, 0, 0, 0, 0.000000, 0.000000, 0.000000, 0.000000, '', '', '', '', '', 'a:2:{s:6:"fre-FR";s:0:"";s:16:"always-available";s:6:"fre-FR";}', '') ERREUR: valeur trop longue pour le type character(1)"
|
André R.
|
Tuesday 13 April 2010 6:31:46 am
Unfortunately our test envirmont and QA does not cover Postgres yet, hopefully we will be able to add that for Fuji (4.4). As for the specific issue, I guess you would need to change these to become TEXT fields. SQL for changing them would be something like: ALTER TABLE ezcontentclass RENAME COLUMN serialized_description_list TO sdl_tmp;
ALTER TABLE ezcontentclass ADD COLUMN serialized_description_list TEXT;
ALTER TABLE ezcontentclass ALTER serialized_description_list SET DEFAULT NULL;
UPDATE ezcontentclass SET serialized_description_list=sdl_tmp;
ALTER TABLE ezcontentclass DROP COLUMN sdl_tmp;
ALTER TABLE ezcontentclass_attribute RENAME COLUMN serialized_data_text TO sdt_tmp;
ALTER TABLE ezcontentclass_attribute ADD COLUMN serialized_data_text TEXT;
ALTER TABLE ezcontentclass_attribute ALTER serialized_data_text SET DEFAULT NULL;
UPDATE ezcontentclass_attribute SET serialized_data_text=sdt_tmp;
ALTER TABLE ezcontentclass_attribute DROP COLUMN sdt_tmp;
ALTER TABLE ezcontentclass_attribute RENAME COLUMN serialized_description_list TO sdl_tmp;
ALTER TABLE ezcontentclass_attribute ADD COLUMN serialized_description_list TEXT;
ALTER TABLE ezcontentclass_attribute ALTER serialized_description_list SET DEFAULT NULL;
UPDATE ezcontentclass_attribute SET serialized_description_list=sdl_tmp;
ALTER TABLE ezcontentclass_attribute DROP COLUMN sdl_tmp;
And diff for sql update file something like: Index: update/database/postgresql/4.3/dbupdate-4.2.0-to-4.3.0.sql
===================================================================
--- update/database/postgresql/4.3/dbupdate-4.2.0-to-4.3.0.sql (revision 25223)
+++ update/database/postgresql/4.3/dbupdate-4.2.0-to-4.3.0.sql (working copy)
@@ -4,12 +4,12 @@
ALTER TABLE ezrss_export_item ADD COLUMN enclosure character varying(255);
ALTER TABLE ezrss_export_item ALTER enclosure SET DEFAULT NULL;
-ALTER TABLE ezcontentclass ADD COLUMN serialized_description_list character;
+ALTER TABLE ezcontentclass ADD COLUMN serialized_description_list TEXT;
ALTER TABLE ezcontentclass ALTER serialized_description_list SET DEFAULT NULL;
-ALTER TABLE ezcontentclass_attribute ADD COLUMN serialized_data_text character;
+ALTER TABLE ezcontentclass_attribute ADD COLUMN serialized_data_text TEXT;
ALTER TABLE ezcontentclass_attribute ALTER serialized_data_text SET DEFAULT NULL;
-ALTER TABLE ezcontentclass_attribute ADD COLUMN serialized_description_list character;
+ALTER TABLE ezcontentclass_attribute ADD COLUMN serialized_description_list TEXT;
ALTER TABLE ezcontentclass_attribute ALTER serialized_description_list SET DEFAULT NULL;
ALTER TABLE ezcontentclass_attribute ADD COLUMN category character varying(25);
eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom
|