| Line 56... |
Line 56... |
| 56 |
echo "Content generation completed"
|
56 |
echo "Content generation completed"
|
| 57 |
|
57 |
|
| 58 |
echo "Dumping vendoritemmapping and vendoritempricing tables to be imported on staging and production servers"
|
58 |
echo "Dumping vendoritemmapping and vendoritempricing tables to be imported on staging and production servers"
|
| 59 |
echo "======================================================="
|
59 |
echo "======================================================="
|
| 60 |
cd ${PRGDIR}
|
60 |
cd ${PRGDIR}
|
| 61 |
mysqldump -uroot -pshop2020 catalog --tables similaritems source sourceitempricing category voucheritemmapping freebieitem entitytag amazonlisted storepricing brandinfo privatedeals iteminsurermapping > ${MYSQL_DUMP}
|
61 |
mysqldump -uroot -pshop2020 catalog --tables similaritems source sourceitempricing category voucheritemmapping freebieitem entitytag amazonlisted storepricing brandinfo privatedeals bulkitempricing > ${MYSQL_DUMP}
|
| 62 |
mysql -uroot -pshop2020 catalog -e "truncate tmpitemforcat;insert into tmpitemforcat SELECT * FROM item"
|
62 |
mysql -uroot -pshop2020 catalog -e "truncate tmpitemforcat;insert into tmpitemforcat SELECT * FROM item"
|
| 63 |
a1=$(mysql -uroot -N -pshop2020 catalog -e "SET SESSION group_concat_max_len = 100000;select GROUP_CONCAT(b.id) from ((select a.id from (select * from tmpitem union distinct select * from tmpitemforcat) as a group by id having count(a.id) > 1) union (select id from tmpitemforcat i1 where not exists (select * from tmpitem t where t.id = i1.id))) as b")
|
63 |
a1=$(mysql -uroot -N -pshop2020 catalog -e "SET SESSION group_concat_max_len = 100000;select GROUP_CONCAT(b.id) from ((select a.id from (select * from tmpitem union distinct select * from tmpitemforcat) as a group by id having count(a.id) > 1) union (select id from tmpitemforcat i1 where not exists (select * from tmpitem t where t.id = i1.id))) as b")
|
| 64 |
mysqldump -uroot -pshop2020 catalog item --replace --no-create-info --where="id in ($a1)" >> ${MYSQL_DUMP}
|
64 |
mysqldump -uroot -pshop2020 catalog item --replace --no-create-info --where="id in ($a1)" >> ${MYSQL_DUMP}
|
| 65 |
|
65 |
|
| 66 |
|
66 |
|