i'm pretty new with Magento 2 - so i have tons of dummy questions
After the try to understand the Magento 2-MySQL-Schema - i was able to insert new categories in the following tables:
in the pictures below you could see an extract from my db-entrys.
But I'm not able to see my new categories in Magento (admin and frontend).
Did i miss a table or a entry in another file?
with friendly regards!!
Work directly with Database in Magento 2 is not best solution. Instead use Resource models. But if you wan't just investigate how it works i checked your workflow on fresh Magento 2.1 instance.
After I added new row in category entity table and clean cache:
INSERT INTO `magento21`.`catalog_category_entity` (`attribute_set_id`, `parent_id`, `created_at`, `updated_at`, `path`, `position`, `level`, `children_count`) VALUES (3, 2, '2018-07-16 14:47:42', '2018-07-16 14:47:42', '1/2/3', 1, 2, 0)
In my admin Area i saw my new Category:
After that i tried to add name attribute for our new category:
INSERT INTO `magento21`.`catalog_category_entity_varchar` (`attribute_id`, `store_id`, `entity_id`, `value`) VALUES (45, 0, 3, 'Test Category')
and seems all works:
To be sure that problem is in database try to clean cache:
php bin/magento cache:clean
Admin Area should show categories even if in DB you added only entity without attributes and additional info. Frontend area little bit complicated then Admin. To see Category on Frontend you should enable it and add some products to category.