[ Index ] |
|
Code source de eZ Publish 3.9.0 |
1 #Adding two field in table ezcontentobject_tree 2 3 alter table ezcontentobject_tree add sort_field int default 1 after path_identification_string; 4 alter table ezcontentobject_tree add sort_order int(1) default 1 after path_identification_string; 5 6 7 #Adding two field in table eznode_assignment 8 alter table eznode_assignment add sort_field int default 1 after main; 9 alter table eznode_assignment add sort_order int(1) default 1 after main; 10 11 # Change the length of enum fields 12 alter table ezenumvalue change enumelement enumelement varchar(255); 13 alter table ezenumvalue change enumvalue enumvalue varchar(255); 14 15 alter table ezenumobjectvalue change enumelement enumelement varchar(255); 16 alter table ezenumobjectvalue change enumvalue enumvalue varchar(255); 17 18 # Adding two field in table ezsearch_object_word_link 19 alter table ezsearch_object_word_link add published int not null after contentclass_attribute_id; 20 alter table ezsearch_object_word_link add section_id int not null after published; 21 22 # Sorting priority 23 alter table ezcontentobject_tree add priority int not null default '0'; 24 25 # storing info about module and function of limitation 26 # you should run that query only for kernel_clean db 27 update ezpolicy_limitation set function_name='read', module_name='content', identifier='Class' where policy_id=306; 28 29 # add session_key for session based workflows 30 # note!!!: for PostgreSQL you are not able to set default value when add column. You need to run additional 31 # alter command: alter table ezworkflow_process alter column session_key SET DEFAULT '0'; 32 alter table ezworkflow_process add column session_key varchar(32) NOT NULL DEFAULT '0'; 33 alter table ezworkflow_process add column process_key char(32) NOT NULL ; 34 alter table ezworkflow_process add column parameters text; 35 alter table ezworkflow_process add column memento_key char(32); 36 37 # Change data type for messages 38 alter table ezmessage change title title varchar(255); 39 alter table ezmessage change body body text; 40 41 42 #After beta 2: 43 # for mysql 44 alter table eznode_assignment add from_node_id int default 0; 45 # for Postgresql 46 # alter table eznode_assignment add from_node_id int; 47 # alter table eznode_assignment alter column from_node_id set default 0; 48 49 # After beta 3 50 alter table eztrigger add column name varchar(255) not null; 51 DROP TABLE IF EXISTS ezoperation_memento; 52 CREATE TABLE ezoperation_memento ( 53 id int NOT NULL auto_increment, 54 main_key int NOT NULL default 0, 55 memento_key varchar(32) NOT NULL, 56 memento_data text NOT NULL, 57 main int NOT NULL default 0, 58 PRIMARY KEY(id, memento_key) ); 59 60 alter table ezcontentclass_attribute add is_information_collector int not null default 0; 61 62 alter table ezworkflow_group_link drop PRIMARY KEY; 63 alter table ezworkflow_group_link modify COLUMN workflow_version int not null default 0; 64 alter table ezworkflow_group_link add PRIMARY KEY ( workflow_id,group_id,workflow_version); 65 66 67 CREATE TABLE ezvattype ( 68 id int(11) NOT NULL auto_increment, 69 name varchar(255) NOT NULL, 70 percentage float default NULL, 71 PRIMARY KEY (id) ); 72 73 74 alter table ezproductcollection_item drop price_is_inc_vat; 75 76 CREATE TABLE ezuser_discountrule ( 77 id int(11) NOT NULL auto_increment, 78 discountrule_id int(11) default NULL, 79 contentobject_id int(11) default NULL, 80 name varchar(255) NOT NULL, 81 PRIMARY KEY (id) ); 82 83 84 CREATE TABLE ezdiscountsubrule ( 85 id int(11) NOT NULL auto_increment, 86 name varchar(255) NOT NULL, 87 discountrule_id int(11) NOT NULL, 88 discount_percent float default NULL, 89 limitation char(1) default NULL, 90 PRIMARY KEY (id) 91 ); 92 93 CREATE TABLE ezdiscountsubrule_value ( 94 discountsubrule_id int(11) NOT NULL, 95 value int(11) NOT NULL, 96 issection int(1) NOT NULL, 97 PRIMARY KEY (discountsubrule_id,value,issection) 98 ); 99 100 create table ezinformationcollection ( 101 id int(11) NOT NULL auto_increment, 102 contentobject_id int(11) not null default 0, 103 created int(11) not null default 0, 104 PRIMARY KEY (id) 105 ); 106 107 create table ezinformationcollection_attribute ( 108 id int(11) NOT NULL auto_increment, 109 informationcollection_id int(11) not null default 0, 110 data_text text, 111 data_int int(11) default NULL, 112 data_float float default NULL, 113 PRIMARY KEY (id) 114 ); 115 116 # After beta 4 117 118 # For mysql 119 alter table ezcontentobject_tree drop md5_path; 120 alter table ezcontentobject_tree drop left_margin; 121 alter table ezcontentobject_tree drop right_margin; 122 123 # For postgresql 124 #create table temp_tree as select * from ezcontentobject_tree; 125 #drop table ezcontentobject_tree; 126 #CREATE TABLE "ezcontentobject_tree" ( 127 # "node_id" integer DEFAULT nextval('ezcontentobject_tree_s'::text) NOT NULL, 128 # "parent_node_id" integer NOT NULL, 129 # "contentobject_id" integer, 130 # "contentobject_version" integer, 131 # "contentobject_is_published" integer, 132 # "crc32_path" integer, 133 # "depth" integer NOT NULL, 134 # "path_string" character varying(255) NOT NULL, 135 # "path_identification_string" text, 136 # "sort_field" integer default 1, 137 # "sort_order" smallint default 1, 138 # "priority" integer default 0, 139 # Constraint "ezcontentobject_tree_pkey" Primary Key ("node_id") 140 #); 141 #insert into ezcontentobject_tree select node_id, parent_node_id, contentobject_id, contentobject_version, contentobject_is_published,crc32_path, depth, path_string, path_identification_string,sort_field,sort_order,priority from temp_tree; 142 #drop table temp_tree; 143 144 alter table eznode_assignment change main is_main int not null; 145 # PostgreSQL 146 # alter table eznode_assignment rename column main to is_main; 147 148 #alter table ezcontentobject drop main_node_id; 149 alter table ezcontentobject drop permission_id; 150 alter table ezcontentobject_tree add column main_node_id integer ; 151 152 create table ezcontentobject_name( 153 contentobject_id int not null, 154 name varchar(255), 155 content_version int not null, 156 content_translation varchar(20) not null, 157 real_translation varchar(20), 158 primary key (contentobject_id,content_version, content_translation ) 159 ); 160 #you need to do it for each language you have 161 insert into ezcontentobject_name select id,name,current_version, 'eng-GB', 'eng-GB' from ezcontentobject, ezcontentobject_tree where ezcontentobject.id = ezcontentobject_tree.contentobject_id; 162 insert into ezcontentobject_name select id,name,current_version, 'nor-NO', 'eng-GB' from ezcontentobject, ezcontentobject_tree where ezcontentobject.id = ezcontentobject_tree.contentobject_id; 163 164 CREATE TABLE ezdiscountrule ( 165 id int(11) NOT NULL auto_increment, 166 name varchar(255) NOT NULL, 167 PRIMARY KEY (id) 168 ); 169 170 alter table ezorder add is_temporary int not null default 1; 171 172 alter table ezinformationcollection_attribute add contentclass_attribute_id int not null; 173 174 create table ezorder_item( 175 id int primary key NOT NULL auto_increment, 176 order_id int not null, 177 description varchar(255), 178 price float, 179 vat_is_included int, 180 vat_type_id int 181 ); 182 183 alter table ezorder add order_nr int not null default 0; 184 185 186 187 # After RC1 188 create table ezwaituntildatevalue( 189 id int NOT NULL auto_increment, 190 workflow_event_id int NOT NULL default '0', 191 workflow_event_version int NOT NULL default '0', 192 contentclass_id int NOT NULL default '0', 193 contentclass_attribute_id int NOT NULL default '0', 194 PRIMARY KEY (id,workflow_event_id,workflow_event_version), 195 KEY ezwaituntildatevalue_wf_ev_id_wf_ver (workflow_event_id,workflow_event_version) 196 ); 197 198 199 alter table eznode_assignment add remote_id int(11) NOT NULL default '0'; 200 alter table ezsession add cache_mask_1 int default 0 not null; 201 alter table ezcontentobject_tree add column md5_path varchar(32); 202 # remember to run update/common/scripts/updateniceurls.php to update path_identification strings 203 update ezcontentobject_tree set md5_path = md5( path_identification_string ); 204 alter table ezcontentobject drop column parent_id; 205 206 create table ezcollab_item( 207 id int NOT NULL auto_increment, 208 type_identifier varchar(40) NOT NULL default '', 209 creator_id int NOT NULL default '0', 210 status int NOT NULL default '1', 211 data_text1 text NOT NULL default '', 212 data_text2 text NOT NULL default '', 213 data_text3 text NOT NULL default '', 214 data_int1 int NOT NULL default '0', 215 data_int2 int NOT NULL default '0', 216 data_int3 int NOT NULL default '0', 217 data_float1 float NOT NULL default '0', 218 data_float2 float NOT NULL default '0', 219 data_float3 float NOT NULL default '0', 220 created int NOT NULL default '0', 221 modified int NOT NULL default '0', 222 PRIMARY KEY (id) 223 ); 224 225 create table ezcollab_group( 226 id int NOT NULL auto_increment, 227 parent_group_id int NOT NULL default '0', 228 depth int(11) NOT NULL default '0', 229 path_string varchar(255) NOT NULL default '', 230 is_open int NOT NULL default '1', 231 user_id int NOT NULL default '0', 232 title varchar(255) NOT NULL default '', 233 priority int NOT NULL default '0', 234 created int NOT NULL default '0', 235 modified int NOT NULL default '0', 236 PRIMARY KEY (id), 237 KEY ezcollab_group_path (path_string), 238 KEY ezcollab_group_depth (depth) 239 ); 240 241 create table ezcollab_item_group_link( 242 collaboration_id int NOT NULL DEFAULT '0', 243 group_id int NOT NULL default '0', 244 user_id int NOT NULL default '0', 245 is_read int NOT NULL default '0', 246 is_active int NOT NULL default '1', 247 last_read int NOT NULL default '0', 248 created int NOT NULL default '0', 249 modified int NOT NULL default '0', 250 PRIMARY KEY (collaboration_id, group_id, user_id) 251 ); 252 253 create table ezcollab_item_status( 254 collaboration_id int NOT NULL DEFAULT '0', 255 user_id int NOT NULL default '0', 256 is_read int NOT NULL default '0', 257 is_active int NOT NULL default '1', 258 last_read int NOT NULL default '0', 259 PRIMARY KEY (collaboration_id, user_id) 260 ); 261 262 create table ezcollab_item_participant_link( 263 collaboration_id int NOT NULL DEFAULT '0', 264 participant_id int NOT NULL default '0', 265 participant_type int NOT NULL default '1', 266 participant_role int NOT NULL default '1', 267 is_read int NOT NULL default '0', 268 is_active int NOT NULL default '1', 269 last_read int NOT NULL default '0', 270 created int NOT NULL default '0', 271 modified int NOT NULL default '0', 272 PRIMARY KEY (collaboration_id, participant_id) 273 ); 274 275 create table ezcollab_item_message_link( 276 id int NOT NULL auto_increment, 277 collaboration_id int NOT NULL DEFAULT '0', 278 participant_id int NOT NULL default '0', 279 message_id int NOT NULL default '0', 280 message_type int NOT NULL default '0', 281 created int NOT NULL default '0', 282 modified int NOT NULL default '0', 283 PRIMARY KEY (id) 284 ); 285 286 create table ezcollab_simple_message( 287 id int NOT NULL auto_increment, 288 message_type varchar(40) NOT NULL default '', 289 creator_id int NOT NULL default '0', 290 data_text1 text NOT NULL default '', 291 data_text2 text NOT NULL default '', 292 data_text3 text NOT NULL default '', 293 data_int1 int NOT NULL default '0', 294 data_int2 int NOT NULL default '0', 295 data_int3 int NOT NULL default '0', 296 data_float1 float NOT NULL default '0', 297 data_float2 float NOT NULL default '0', 298 data_float3 float NOT NULL default '0', 299 created int NOT NULL default '0', 300 modified int NOT NULL default '0', 301 PRIMARY KEY (id) 302 ); 303 304 create table ezcollab_profile( 305 id int NOT NULL auto_increment, 306 user_id int NOT NULL default '0', 307 main_group int NOT NULL default '0', 308 data_text1 text NOT NULL default '', 309 created int NOT NULL default '0', 310 modified int NOT NULL default '0', 311 PRIMARY KEY (id) 312 ); 313 314 create table ezcontent_translation( 315 id int NOT NULL auto_increment, 316 name varchar(255) NOT NULL DEFAULT '', 317 locale varchar(255) NOT NULL, 318 PRIMARY KEY (id) 319 ); 320 321 # adding status to ezcontentobject and making correct update of it 322 alter table ezcontentobject add column status int default 0; 323 create temporary table ezcontentobject_temp as select distinct ezcontentobject.* from ezcontentobject, ezcontentobject_tree where ezcontentobject_tree.contentobject_id = ezcontentobject.id; 324 update ezcontentobject_temp set status = 1; 325 insert into ezcontentobject_temp select ezcontentobject.* from ezcontentobject left join ezcontentobject_tree on ezcontentobject.id = ezcontentobject_tree.contentobject_id where ezcontentobject_tree.contentobject_id is null; 326 delete from ezcontentobject; 327 insert into ezcontentobject select * from ezcontentobject_temp; 328 329 330 # Change workflow approve tables to reflect the new collaboration system 331 create table ezapprove_items( 332 id int NOT NULL auto_increment, 333 workflow_process_id int NOT NULL DEFAULT '0', 334 collaboration_id int NOT NULL DEFAULT '0', 335 PRIMARY KEY (id) 336 ); 337 338 insert into ezapprove_items (workflow_process_id, collaboration_id) select workflow_process_id, task_id from ezapprovetasks; 339 340 drop table ezapprovetasks; 341 342 # Fixes a bug with workflows and mementos 343 alter table ezoperation_memento drop main_key; 344 alter table ezoperation_memento add main_key varchar(32) NOT NULL; 345 346 # Fixed a bug with a lacking field in ezmedia 347 alter table ezmedia add controls varchar(50); 348 349 # Add some extra info the url table 350 alter table ezurl add created int NOT NULL DEFAULT '0'; 351 alter table ezurl add modified int NOT NULL DEFAULT '0'; 352 alter table ezurl add is_valid int NOT NULL DEFAULT '1'; 353 alter table ezurl add last_checked int NOT NULL DEFAULT '0'; 354 alter table ezurl add original_url_md5 varchar(32) NOT NULL DEFAULT ''; 355 356 # run update/common/scripts/updatexmltext.php to fix XML fields with bad links. 357 358 alter table ezinformationcollection rename as ezinfocollection; 359 alter table ezinformationcollection_attribute rename as ezinfocollection_attribute;
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 |