INSERT INTO catalog_category_entity (
entity_id, 
entity_type_id, 
attribute_set_id, 
parent_id, 
created_at, 
updated_at, 
path, 
position,  
level, 
children_count
) values (
<@WGROUPID@>,
'3',
'3',
<@WPARENTGROUP2ID@>,
now(),
now(),
'1/<@WPARENTGROUP2ID@>/<@WGROUPID@>',
<@WSORTNO@>, 
'2',
''
)
@@GO@@
Update catalog_category_entity set 
children_count = children_count + 1
where parent_id = <@WPARENTGROUP2ID@>
@@GO@@
update catalog_category_entity set children_count = children_count + 1  where entity_id= '1'
@@GO@@
INSERT INTO catalog_category_entity_datetime (
value_id, 
entity_type_id, 
attribute_id, 
store_id, 
entity_id, 
value
) values (
<@WGROUPID@>, 
'3', 
'53', 
<@PREFIX@>,
<@WGROUPID@>,     
''
)
@@GO@@
INSERT INTO catalog_category_entity_datetime (
value_id, 
entity_type_id, 
attribute_id, 
store_id, 
entity_id, 
value
) values (
'', 
'3', 
'54',
<@PREFIX@>,  
<@WGROUPID@>,    
''
)
@@GO@@
INSERT INTO catalog_category_entity_int (
value_id, 
entity_type_id, 
attribute_id, 
store_id, 
entity_id, 
value
) values (
'',   
'3', 
'36', 
<@PREFIX@>, 
<@WGROUPID@>,    
'1'
)
@@GO@@
INSERT INTO catalog_category_entity_int (
value_id, 
entity_type_id, 
attribute_id, 
store_id, 
entity_id, 
value
) values (
'',   
'3', 
'61', 
<@PREFIX@>, 
<@WGROUPID@>,     
'1'
)
@@GO@@
INSERT INTO catalog_category_entity_int (
value_id, 
entity_type_id, 
attribute_id, 
store_id, 
entity_id, 
value
) values (
'',   
'3', 
'44', 
<@PREFIX@>, 
<@WGROUPID@>,    
''
)
@@GO@@
INSERT INTO catalog_category_entity_int (
value_id, 
entity_type_id, 
attribute_id, 
store_id, 
entity_id, 
value
) values (
'',   
'3', 
'45', 
<@PREFIX@>, 
<@WGROUPID@>,     
'0'
)
@@GO@@
INSERT INTO catalog_category_entity_int (
value_id, 
entity_type_id, 
attribute_id, 
store_id, 
entity_id, 
value
) values (
'',   
'3', 
'62', 
<@PREFIX@>, 
<@WGROUPID@>,     
'0'
)
@@GO@@
INSERT INTO catalog_category_entity_int (
value_id, 
entity_type_id, 
attribute_id, 
store_id, 
entity_id, 
value
) values (
'',   
'3', 
'63', 
<@PREFIX@>, 
<@WGROUPID@>,     
'0'
)
@@GO@@
INSERT INTO catalog_category_entity_int (
value_id, 
entity_type_id, 
attribute_id, 
store_id, 
entity_id, 
value
) values (
'',   
'3', 
'64', 
<@PREFIX@>, 
<@WGROUPID@>,     
'0'
)
@@GO@@
INSERT INTO catalog_category_entity_text (
value_id, 
entity_type_id, 
attribute_id, 
store_id, 
entity_id, 
value
) values (
'',   
'3', 
'38', 
<@PREFIX@>, 
<@WGROUPID@>,     
'<@SDESCRIPTION@>'
)
@@GO@@
INSERT INTO catalog_category_entity_text (
value_id, 
entity_type_id, 
attribute_id, 
store_id, 
entity_id, 
value
) values (
'',   
'3', 
'41',  
<@PREFIX@>, 
<@WGROUPID@>,     
'Meta Keywords'
)
@@GO@@
INSERT INTO catalog_category_entity_text (
value_id, 
entity_type_id, 
attribute_id, 
store_id, 
entity_id, 
value
) values (
'',   
'3', 
'42',  
<@PREFIX@>, 
<@WGROUPID@>,     
'Meta description'
)
@@GO@@
INSERT INTO catalog_category_entity_text (
value_id, 
entity_type_id, 
attribute_id, 
store_id, 
entity_id, 
value
) values (
'',   
'3', 
'56',  
<@PREFIX@>, 
<@WGROUPID@>,     
''
)
@@GO@@
INSERT INTO catalog_category_entity_text (
value_id, 
entity_type_id, 
attribute_id, 
store_id, 
entity_id, 
value
) values (
'',   
'3', 
'59',   
<@PREFIX@>, 
<@WGROUPID@>,     
''
)
@@GO@@
INSERT INTO catalog_category_entity_varchar (
value_id, 
entity_type_id, 
attribute_id, 
store_id, 
entity_id, 
value
) values (
'',   
'3', 
'35', 
<@PREFIX@>, 
<@WGROUPID@>,     
'<@SDESCRIPTION@>'
)
@@GO@@
INSERT INTO catalog_category_entity_varchar (
value_id, 
entity_type_id, 
attribute_id, 
store_id, 
entity_id, 
value
) values (
'',   
'3', 
'37', 
<@PREFIX@>, 
<@WGROUPID@>,     
'url-key'
)
@@GO@@
INSERT INTO catalog_category_entity_varchar (
value_id, 
entity_type_id, 
attribute_id, 
store_id, 
entity_id, 
value
) values (
'',   
'3', 
'40',  
<@PREFIX@>, 
<@WGROUPID@>,    
'Meta Keywords'
)
@@GO@@
INSERT INTO catalog_category_entity_varchar (
value_id, 
entity_type_id, 
attribute_id, 
store_id, 
entity_id, 
value
) values (
'',   
'3', 
'43', 
<@PREFIX@>, 
<@WGROUPID@>,     
'PRODUCTS'
)
@@GO@@
INSERT INTO catalog_category_entity_varchar (
value_id, 
entity_type_id, 
attribute_id, 
store_id, 
entity_id, 
value
) values (
'',   
'3', 
'52', 
<@PREFIX@>, 
<@WGROUPID@>,     
''
)
@@GO@@
INSERT INTO catalog_category_entity_varchar (
value_id, 
entity_type_id, 
attribute_id, 
store_id, 
entity_id, 
value
) values (
'',   
'3', 
'55', 
<@PREFIX@>, 
<@WGROUPID@>,     
''
)
@@GO@@
INSERT INTO index_event (
event_id, 
type, 
entity, 
entity_pk, 
created_at, 
old_data, 
new_data
) values (
'',   
'save', 
'catalog_category', 
<@WGROUPID@>,     
now(),
'', 
'a:6:{s:35:"cataloginventory_stock_match_result";b:0;s:34:"catalog_product_price_match_result";b:0;s:24:"catalog_url_match_result";b:1;s:33:"catalog_product_flat_match_result";b:0;s:37:"catalog_category_product_match_result";b:1;s:35:"catalogsearch_fulltext_match_result";b:1;}'
)
@@GO@@
Update index_process set started_at = now(), ended_at = now() where indexer_code = 'catalog_url';
@@GO@@
Update index_process set started_at = now(), ended_at = now() where indexer_code = 'catalog_category_product';
@@GO@@
Update index_process set started_at = now(), ended_at = now() where indexer_code = 'catalogsearch_fulltext';
@@GO@@