1

Good morning,

I'm using magento 2.1.9 and yesterday I did a backup recovery, but now when I try to access to;

Content/Design/Configuration

the following error appears;

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'myserver.design_config_grid_flat' doesn't exist, query was: SELECT COUNT(*) FROM `design_config_grid_flat` AS `main_table`

How can I fix this error?

Thank you!

4
  • have you gone into the database to see if it's actually there? show tables;
    – treyBake
    Nov 17, 2017 at 9:47
  • I just checked my database and it's not there. So, how can i regenerate or create this table?
    – Núria
    Nov 17, 2017 at 9:55
  • try running php bin/magento setup:upgrade && php bin/magento setup:di:compile in terminal - might add it again, if that doesn't work I'll post the table structure and data for you to copy
    – treyBake
    Nov 17, 2017 at 9:59
  • It doesn't add it again. Could you post the table structure and data please? Thank you so much.
    – Núria
    Nov 17, 2017 at 10:05

2 Answers 2

5

As requested in comment:

CREATE TABLE `design_config_grid_flat` (
    `entity_id`        int(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT,
    `store_website_id` int(11),
    `store_group_id`   int(11),
    `store_id`         int(11),
    `theme_theme_id`   varchar(255)
);

then the data:

INSERT INTO `design_config_grid_flat` (
    `store_website_id`, `store_group_id`, `store_id`
) VALUES
(null, null, null),
(1,    null, null),
(1,    1,    1);

This should do it - let me know if there are any issues (run in mysql^^)

0

Create the missing table:

  CREATE TABLE `design_config_grid_flat` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',
  `store_website_id` int(11) DEFAULT NULL COMMENT 'Store_website_id',
  `store_group_id` int(11) DEFAULT NULL COMMENT 'Store_group_id',
  `store_id` int(11) DEFAULT NULL COMMENT 'Store_id',
  `theme_theme_id` varchar(255) DEFAULT NULL COMMENT 'Theme_theme_id',
  PRIMARY KEY (`entity_id`),
  KEY `DESIGN_CONFIG_GRID_FLAT_STORE_WEBSITE_ID` (`store_website_id`),
  KEY `DESIGN_CONFIG_GRID_FLAT_STORE_GROUP_ID` (`store_group_id`),
  KEY `DESIGN_CONFIG_GRID_FLAT_STORE_ID` (`store_id`),
  FULLTEXT KEY `DESIGN_CONFIG_GRID_FLAT_THEME_THEME_ID` (`theme_theme_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='design_config_grid_flat';

Then run the indexer:

php bin/magento indexer:reindex

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.