[ Index ] |
|
Code source de eZ Publish 3.9.0 |
1 alter table ezsearch_object_word_link add column identifier varchar(255); 2 alter table ezsearch_object_word_link alter column identifier set not null; 3 alter table ezsearch_object_word_link alter column identifier set default ''; 4 alter table ezsearch_object_word_link add column integer_value integer; 5 alter table ezsearch_object_word_link alter column integer_value set not null; 6 alter table ezsearch_object_word_link alter column integer_value set default '0'; 7 8 CREATE SEQUENCE ezcollab_notification_rule_s 9 START 1 10 INCREMENT 1 11 MAXVALUE 9223372036854775807 12 MINVALUE 1 13 CACHE 1; 14 15 CREATE TABLE ezcollab_notification_rule ( 16 id integer DEFAULT nextval('ezcollab_notification_rule_s'::text) NOT NULL, 17 user_id character varying(255) DEFAULT '' NOT NULL, 18 collab_identifier character varying(255) DEFAULT '' NOT NULL, 19 PRIMARY KEY ( id ) 20 ); 21 22 23 CREATE TABLE ezurl_object_link ( 24 url_id integer DEFAULT '0' NOT NULL, 25 contentobject_attribute_id integer DEFAULT '0' NOT NULL, 26 contentobject_attribute_version integer DEFAULT '0' NOT NULL, 27 PRIMARY KEY ( url_id, contentobject_attribute_id, contentobject_attribute_version ) 28 ); 29 30 CREATE TABLE ezsite_data ( 31 name varchar(60) NOT NULL default '', 32 value text NOT NULL default '', 33 PRIMARY KEY (name) 34 ); 35 36 drop index ezcontentobject_tree_depth; 37 create index ezsearch_word_object_count on ezsearch_word(object_count); 38 create index ezcontentobject_status on ezcontentobject( status ); 39 create index ezcontentobject_tree_path_depth on ezcontentobject_tree( path_string, depth ); 40 41 alter table ezcontentclass_attribute add can_translate int; 42 alter table ezcontentclass_attribute alter can_translate set default 1; 43 alter table ezcontentobject_attribute add attribute_original_id int; 44 alter table ezcontentobject_attribute alter attribute_original_id set default 0; 45 46 CREATE SEQUENCE ezurlalias_s 47 START 1 48 INCREMENT 1 49 MAXVALUE 9223372036854775807 50 MINVALUE 1 51 CACHE 1; 52 53 CREATE TABLE ezurlalias ( 54 id integer DEFAULT nextval('ezurlalias_s'::text) NOT NULL, 55 source_url text NOT NULL, 56 source_md5 character varying(32), 57 destination_url text NOT NULL, 58 is_internal integer DEFAULT '1' NOT NULL, 59 forward_to_id integer DEFAULT '0' NOT NULL, 60 PRIMARY KEY (id) 61 ); 62 63 create index ezurlalias_source_md5 on ezurlalias( source_md5 ); 64 65 insert into ezurlalias ( source_url, source_md5, destination_url, is_internal ) select path_identification_string, encode( digest( path_identification_string, 'md5' ), 'hex' ), 'content/view/full/' || node_id, 1 from ezcontentobject_tree where node_id <> 1; 66 67 -- Drop unneeded columns 68 -- alter table ezcontentobject_tree drop md5_path; 69 -- alter table ezcontentobject_tree drop crc32_path; 70 71 CREATE TABLE ezcontentobject_tree_tmp ( 72 node_id integer DEFAULT nextval('ezcontentobject_tree_s'::text) NOT NULL, 73 parent_node_id integer DEFAULT '0' NOT NULL, 74 contentobject_id integer, 75 contentobject_version integer, 76 contentobject_is_published integer, 77 depth integer DEFAULT '0' NOT NULL, 78 path_string character varying(255) DEFAULT '' NOT NULL, 79 sort_field integer DEFAULT '1', 80 sort_order integer DEFAULT '1', 81 priority integer DEFAULT '0' NOT NULL, 82 path_identification_string text, 83 main_node_id integer 84 ); 85 86 INSERT INTO ezcontentobject_tree_tmp (node_id, parent_node_id, contentobject_id, contentobject_version, contentobject_is_published, depth, path_string, sort_field, sort_order, priority, path_identification_string, main_node_id ) 87 SELECT node_id, parent_node_id, contentobject_id, contentobject_version, contentobject_is_published, depth, path_string, sort_field, sort_order, priority, path_identification_string, main_node_id 88 FROM ezcontentobject_tree; 89 90 DROP TABLE ezcontentobject_tree; 91 92 CREATE TABLE ezcontentobject_tree ( 93 node_id integer DEFAULT nextval('ezcontentobject_tree_s'::text) NOT NULL, 94 parent_node_id integer DEFAULT '0' NOT NULL, 95 contentobject_id integer, 96 contentobject_version integer, 97 contentobject_is_published integer, 98 depth integer DEFAULT '0' NOT NULL, 99 path_string character varying(255) DEFAULT '' NOT NULL, 100 sort_field integer DEFAULT '1', 101 sort_order integer DEFAULT '1', 102 priority integer DEFAULT '0' NOT NULL, 103 path_identification_string text, 104 main_node_id integer 105 ); 106 107 INSERT INTO ezcontentobject_tree (node_id, parent_node_id, contentobject_id, contentobject_version, contentobject_is_published, depth, path_string, sort_field, sort_order, priority, path_identification_string, main_node_id ) 108 SELECT node_id, parent_node_id, contentobject_id, contentobject_version, contentobject_is_published, depth, path_string, sort_field, sort_order, priority, path_identification_string, main_node_id 109 FROM ezcontentobject_tree_tmp; 110 111 DROP TABLE ezcontentobject_tree_tmp; 112 113 CREATE SEQUENCE ezpreferences_s 114 START 1 115 INCREMENT 1 116 MAXVALUE 9223372036854775807 117 MINVALUE 1 118 CACHE 1; 119 120 CREATE TABLE ezpreferences ( 121 id integer DEFAULT nextval('ezpreferences_s'::text) NOT NULL, 122 user_id integer DEFAULT '0' NOT NULL, 123 name character varying(100), 124 value character varying(100), 125 PRIMARY KEY (id) 126 ); 127 128 create index ezpreferences_name on ezpreferences( name ); 129 130 alter table ezcontentobject_attribute add sort_key_int int; 131 alter table ezcontentobject_attribute alter sort_key_int set default 0; 132 alter table ezcontentobject_attribute alter sort_key_int set not null; 133 alter table ezcontentobject_attribute add sort_key_string varchar(50); 134 alter table ezcontentobject_attribute alter sort_key_string set not null; 135 alter table ezcontentobject_attribute alter sort_key_string set default ''; 136 137 138 -- Remove workflow_event_pos 139 140 CREATE TABLE ezcontentobject_version_tmp ( 141 id integer DEFAULT nextval('ezcontentobject_version_s'::text) NOT NULL, 142 contentobject_id integer, 143 creator_id integer DEFAULT '0' NOT NULL, 144 "version" integer DEFAULT '0' NOT NULL, 145 created integer DEFAULT '0' NOT NULL, 146 modified integer DEFAULT '0' NOT NULL, 147 status integer DEFAULT '0' NOT NULL, 148 user_id integer DEFAULT '0' NOT NULL 149 ); 150 151 INSERT INTO ezcontentobject_version_tmp (id, contentobject_id, creator_id, version, created, modified, status, user_id) 152 SELECT id, contentobject_id, creator_id, version, created, modified, status, user_id 153 FROM ezcontentobject_version; 154 155 DROP TABLE ezcontentobject_version; 156 157 CREATE TABLE ezcontentobject_version ( 158 id integer DEFAULT nextval('ezcontentobject_version_s'::text) NOT NULL, 159 contentobject_id integer, 160 creator_id integer DEFAULT '0' NOT NULL, 161 "version" integer DEFAULT '0' NOT NULL, 162 created integer DEFAULT '0' NOT NULL, 163 modified integer DEFAULT '0' NOT NULL, 164 status integer DEFAULT '0' NOT NULL, 165 user_id integer DEFAULT '0' NOT NULL 166 ); 167 168 INSERT INTO ezcontentobject_version (id, contentobject_id, creator_id, version, created, modified, status, user_id) 169 SELECT id, contentobject_id, creator_id, version, created, modified, status, user_id 170 FROM ezcontentobject_version_tmp; 171 172 DROP TABLE ezcontentobject_version_tmp; 173 174 --- Updates from sort_key to sort_key_int and sort_key_string 175 -- Not needed if you don't upgrade from an svn version of 3.2 176 -- update ezcontentobject_attribute set sort_key_int=sort_key; 177 -- update ezcontentobject_attribute set sort_key_string=sort_key; 178 -- alter table ezcontentobject_attribute drop sort_key; 179 180 181 CREATE INDEX ezcontentobject_attribute_ski ON ezcontentobject_attribute( sort_key_int ); 182 CREATE INDEX ezcontentobject_attribute_sks ON ezcontentobject_attribute( sort_key_string ); 183 184 185 CREATE INDEX ezorder_item_order_id ON ezorder_item( order_id ); 186 CREATE INDEX ezproductcollection_item_productcollection_id ON ezproductcollection_item( productcollection_id ); 187 CREATE INDEX ezurlalias_source_url ON ezurlalias(source_url); 188 CREATE INDEX ezcontentobject_attribute_co_id_ver_lang_code ON ezcontentobject_attribute( contentobject_id, version, language_code); 189 190 191 INSERT INTO ezsite_data (name, value) VALUES('ezpublish-version', '3.2'); 192 INSERT INTO ezsite_data (name, value) VALUES('ezpublish-release', '1');
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sat Feb 24 10:30:04 2007 | par Balluche grâce à PHPXref 0.7 |