-- SQL Script to create the missing _att table
-- This script should be run in your database to fix the error
-- Table 'sdx_toosmart_exteco._att' doesn't exist

CREATE TABLE IF NOT EXISTS `_att` (
  `id_` int(11) NOT NULL AUTO_INCREMENT,
  `id_type` int(11) NOT NULL,
  `id_work` int(11) DEFAULT NULL,
  `actif` tinyint(1) NOT NULL DEFAULT '1',
  `date_creat` datetime DEFAULT NULL,
  `date_modif` datetime DEFAULT NULL,
  `who_creat` varchar(50) DEFAULT NULL,
  `who_modif` varchar(50) DEFAULT NULL,
  `ido_type` int(11) DEFAULT NULL,
  `ido_obje` int(11) DEFAULT NULL,
  
  -- Basic text fields (generally used for various attributes)
  `att1` varchar(255) DEFAULT NULL,
  `att2` varchar(255) DEFAULT NULL,
  `att3` varchar(255) DEFAULT NULL,
  `att4` varchar(255) DEFAULT NULL,
  `att5` varchar(255) DEFAULT NULL,
  `att6` varchar(255) DEFAULT NULL,
  `att7` varchar(255) DEFAULT NULL,
  `att8` varchar(255) DEFAULT NULL,
  `att9` text DEFAULT NULL,
  `att10` varchar(255) DEFAULT NULL,
  
  -- Number fields (generally used for IDs and numeric values)
  `attf1` bigint(20) DEFAULT NULL,
  `attf2` bigint(20) DEFAULT NULL,
  `attf3` bigint(20) DEFAULT NULL,
  `attf4` bigint(20) DEFAULT NULL,
  `attf5` bigint(20) DEFAULT NULL,
  
  -- Date fields
  `attd1` date DEFAULT NULL,
  `attd2` date DEFAULT NULL,
  `attd3` datetime DEFAULT NULL,
  
  PRIMARY KEY (`id_`),
  KEY `id_type` (`id_type`),
  KEY `id_work` (`id_work`),
  KEY `actif` (`actif`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- If you also need to create entity-specific _att tables, uncomment and modify 
-- the following examples as needed:

/*
CREATE TABLE IF NOT EXISTS `eteko_att` (
  -- Same structure as _att table above
  -- ...
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE IF NOT EXISTS `prod_att` (
  -- Same structure as _att table above
  -- ...
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
*/ 