Finished DB Structure for the coming new feature custom fields

This commit is contained in:
johnnyq
2023-05-07 19:45:55 -04:00
parent ac51f0cb72
commit 0f758c5901
6 changed files with 103 additions and 13 deletions

55
db.sql
View File

@@ -53,6 +53,23 @@ CREATE TABLE `api_keys` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `asset_custom`
--
DROP TABLE IF EXISTS `asset_custom`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `asset_custom` (
`asset_custom_id` int(11) NOT NULL AUTO_INCREMENT,
`asset_custom_field_value` int(11) NOT NULL,
`asset_custom_field_id` int(11) NOT NULL,
`asset_custom_asset_id` int(11) NOT NULL,
PRIMARY KEY (`asset_custom_id`),
UNIQUE KEY `asset_custom_field_id` (`asset_custom_field_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `asset_documents`
--
@@ -353,6 +370,42 @@ CREATE TABLE `contacts` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `custom_fields`
--
DROP TABLE IF EXISTS `custom_fields`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `custom_fields` (
`custom_field_id` int(11) NOT NULL AUTO_INCREMENT,
`custom_field_table` varchar(255) NOT NULL,
`custom_field_label` varchar(255) NOT NULL,
`custom_field_type` varchar(255) NOT NULL DEFAULT 'TEXT',
`custom_field_location` int(11) NOT NULL DEFAULT 0,
`custom_field_order` int(11) NOT NULL DEFAULT 999,
PRIMARY KEY (`custom_field_id`),
UNIQUE KEY `custom_field_table` (`custom_field_table`),
UNIQUE KEY `custom_field_label` (`custom_field_label`),
UNIQUE KEY `custom_field_type` (`custom_field_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `custom_values`
--
DROP TABLE IF EXISTS `custom_values`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `custom_values` (
`custom_value_id` int(11) NOT NULL AUTO_INCREMENT,
`custom_value_value` text NOT NULL,
`custom_value_field` int(11) NOT NULL,
PRIMARY KEY (`custom_value_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `documents`
--
@@ -1491,4 +1544,4 @@ CREATE TABLE `vendors` (
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2023-05-02 12:35:34
-- Dump completed on 2023-05-07 19:45:11