Révision 76e2e7c3
Ajouté par Assos Assos il y a environ 10 ans
drupal7/sites/all/modules/flag/flag.install | ||
---|---|---|
113 | 113 |
'not null' => TRUE, |
114 | 114 |
'default' => 0, |
115 | 115 |
'disp-size' => 11, |
116 |
) |
|
116 |
),
|
|
117 | 117 |
), |
118 | 118 |
'primary key' => array('flagging_id'), |
119 | 119 |
'unique keys' => array( |
... | ... | |
121 | 121 |
), |
122 | 122 |
'indexes' => array( |
123 | 123 |
'entity_type_uid_sid' => array('entity_type', 'uid', 'sid'), |
124 |
'entity_type_entity_id_uid_sid' => array('entity_type', 'entity_id', 'uid', 'sid'), |
|
124 |
'entity_type_entity_id_uid_sid' => array( |
|
125 |
'entity_type', |
|
126 |
'entity_id', |
|
127 |
'uid', |
|
128 |
'sid', |
|
129 |
), |
|
125 | 130 |
'entity_id_fid' => array('entity_id', 'fid'), |
126 | 131 |
), |
127 | 132 |
); |
... | ... | |
190 | 195 |
'not null' => TRUE, |
191 | 196 |
'default' => 0, |
192 | 197 |
'disp-size' => 11, |
193 |
) |
|
198 |
),
|
|
194 | 199 |
), |
195 | 200 |
'primary key' => array('fid', 'entity_id'), |
196 | 201 |
'indexes' => array( |
... | ... | |
296 | 301 |
function flag_update_6201() { |
297 | 302 |
// Remove "content type" from one key, see http://drupal.org/node/612602. |
298 | 303 |
db_drop_unique_key('flag_content', 'fid_content_type_content_id_uid'); |
299 |
db_add_unique_key('flag_content', 'fid_content_id_uid', array('fid', 'content_id', 'uid')); |
|
304 |
db_add_unique_key('flag_content', 'fid_content_id_uid', array( |
|
305 |
'fid', |
|
306 |
'content_id', |
|
307 |
'uid', |
|
308 |
)); |
|
300 | 309 |
|
301 | 310 |
// Add a count index, see http://drupal.org/node/489610. |
302 | 311 |
db_add_index('flag_counts', 'count', array('count')); |
... | ... | |
311 | 320 |
db_drop_index('flag_content', 'content_type_uid'); |
312 | 321 |
|
313 | 322 |
// Add the column. |
314 |
db_add_field('flag_content', 'sid', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0)); |
|
323 |
db_add_field('flag_content', 'sid', array( |
|
324 |
'type' => 'int', |
|
325 |
'unsigned' => TRUE, |
|
326 |
'not null' => TRUE, |
|
327 |
'default' => 0, |
|
328 |
)); |
|
315 | 329 |
|
316 | 330 |
// Re-add the removed keys. |
317 |
db_add_unique_key('flag_content', 'fid_content_id_uid_sid', array('fid', 'content_id', 'uid', 'sid')); |
|
318 |
db_add_index('flag_content', 'content_type_uid_sid', array('content_type', 'uid', 'sid')); |
|
331 |
db_add_unique_key('flag_content', 'fid_content_id_uid_sid', array( |
|
332 |
'fid', |
|
333 |
'content_id', |
|
334 |
'uid', |
|
335 |
'sid', |
|
336 |
)); |
|
337 |
db_add_index('flag_content', 'content_type_uid_sid', array( |
|
338 |
'content_type', |
|
339 |
'uid', |
|
340 |
'sid', |
|
341 |
)); |
|
319 | 342 |
} |
320 | 343 |
|
321 | 344 |
/** |
... | ... | |
357 | 380 |
db_drop_unique_key('flag_content', 'content_type_content_id_uid_sid'); |
358 | 381 |
} |
359 | 382 |
|
360 |
db_add_index('flag_content', 'content_type_content_id_uid_sid', array('content_type', 'content_id', 'uid', 'sid')); |
|
383 |
db_add_index('flag_content', 'content_type_content_id_uid_sid', array( |
|
384 |
'content_type', |
|
385 |
'content_id', |
|
386 |
'uid', |
|
387 |
'sid', |
|
388 |
)); |
|
361 | 389 |
} |
362 | 390 |
|
363 | 391 |
/** |
364 | 392 |
* Adds column last_updated to flag_counts table. |
365 | 393 |
*/ |
366 | 394 |
function flag_update_6207() { |
367 |
db_add_field('flag_counts', 'last_updated', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'disp-size' => 11), array('indexes' => array('last_updated' => array('last_updated')))); |
|
395 |
db_add_field('flag_counts', 'last_updated', array( |
|
396 |
'type' => 'int', |
|
397 |
'unsigned' => TRUE, |
|
398 |
'not null' => TRUE, |
|
399 |
'default' => 0, |
|
400 |
'disp-size' => 11), |
|
401 |
array('indexes' => array('last_updated' => array('last_updated')))); |
|
368 | 402 |
} |
369 | 403 |
|
370 | 404 |
/** |
... | ... | |
482 | 516 |
), |
483 | 517 |
'indexes' => array( |
484 | 518 |
'entity_type_uid_sid' => array('entity_type', 'uid', 'sid'), |
485 |
'entity_type_content_id_uid_sid' => array('entity_type', 'content_id', 'uid', 'sid'), |
|
519 |
'entity_type_content_id_uid_sid' => array( |
|
520 |
'entity_type', |
|
521 |
'content_id', |
|
522 |
'uid', |
|
523 |
'sid', |
|
524 |
), |
|
486 | 525 |
'content_id_fid' => array('content_id', 'fid'), |
487 | 526 |
), |
488 | 527 |
) |
... | ... | |
510 | 549 |
'fid_entity_id_uid_sid' => array('fid', 'entity_id', 'uid', 'sid'), |
511 | 550 |
), |
512 | 551 |
'indexes' => array( |
513 |
'entity_type_entity_id_uid_sid' => array('entity_type', 'entity_id', 'uid', 'sid'), |
|
552 |
'entity_type_entity_id_uid_sid' => array( |
|
553 |
'entity_type', |
|
554 |
'entity_id', |
|
555 |
'uid', |
|
556 |
'sid', |
|
557 |
), |
|
514 | 558 |
'entity_id_fid' => array('entity_id', 'fid'), |
515 | 559 |
), |
516 | 560 |
) |
... | ... | |
569 | 613 |
'indexes' => array( |
570 | 614 |
'fid_entity_type' => array('fid', 'entity_type'), |
571 | 615 |
'entity_type_content_id' => array('entity_type', 'content_id'), |
572 |
) |
|
616 |
),
|
|
573 | 617 |
) |
574 | 618 |
); |
575 | 619 |
|
... | ... | |
671 | 715 |
} |
672 | 716 |
|
673 | 717 |
// Update show_on_comment and show_on_entity properties to use new view |
674 |
// mode settings. Since the old logic was to show on all view modes, do that. |
|
718 |
// mode settings. Since the old logic was to show on all view modes, do |
|
719 |
// that. |
|
675 | 720 |
if (!empty($flag->show_on_entity) || !empty($flag->show_on_comment)) { |
676 | 721 |
if ($entity_info = entity_get_info($flag->entity_type)) { |
677 | 722 |
foreach ($entity_info['view modes'] as $view_mode => $value) { |
Formats disponibles : Unified diff
Weekly update of contrib modules