DenChu

Перенос ContentRating и PostNotes из 3 в 4

Jun 6th, 2017
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.67 KB | None | 0 0
  1. INSERT INTO ipb_postnotes_notes (`id`, `post_id`, `note`, `author_id`, `type`,`created_at`,`topic_id`)
  2. SELECT `pn_id`, `pn_pid`, `pn_note`, `pn_mid`, if(`pn_type`=1,'warning',if(`pn_type` = 2,'danger','info')), `pn_date`, `t`.`topic_id`
  3. FROM `ipb_post_notes`
  4. JOIN `ipb_forums_posts` as t on (`pid` = `pn_pid` );
  5.  
  6. INSERT INTO `ipb_nbcontentratings_data` (`crd_id`, `crd_member_id`, `crd_member_received`, `crd_rating`, `crd_app`, `crd_type`, `crd_type_id`, `crd_date`, `crd_ip_address`, `crd_class`)
  7. SELECT `rate_id`, `rate_giver`, `rate_receiver`, `rate_rating`, `rate_app`, `rate_type`, `rate_type_id`, `rate_date`, `rate_ip`, 'IPS\\forums\\Topic\\Post'
  8. FROM `ipb_cr_ratings_index`;
Advertisement
Add Comment
Please, Sign In to add comment