Created
January 5, 2020 03:51
-
-
Save saniyathossain/7a166811f628a442e22be15719808ba0 to your computer and use it in GitHub Desktop.
Storing DB Configs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
-- Table structure for table `config_sections` | |
-- | |
DROP TABLE IF EXISTS `config_sections`; | |
/*!40101 SET @saved_cs_client = @@character_set_client */; | |
SET character_set_client = utf8mb4 ; | |
CREATE TABLE `config_sections` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL, | |
`is_reserved` tinyint(1) DEFAULT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; | |
/*!40101 SET character_set_client = @saved_cs_client */; | |
-- | |
-- Dumping data for table `config_sections` | |
-- | |
LOCK TABLES `config_sections` WRITE; | |
/*!40000 ALTER TABLE `config_sections` DISABLE KEYS */; | |
INSERT INTO `config_sections` VALUES (1,'Core',0),(2,'API',1),(3,'Utility',0); | |
/*!40000 ALTER TABLE `config_sections` ENABLE KEYS */; | |
UNLOCK TABLES; | |
-- | |
-- Table structure for table `configs` | |
-- | |
DROP TABLE IF EXISTS `configs`; | |
/*!40101 SET @saved_cs_client = @@character_set_client */; | |
SET character_set_client = utf8mb4 ; | |
CREATE TABLE `configs` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL, | |
`config_section_id` int(11) DEFAULT NULL, | |
`data_type` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL, | |
`key` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL, | |
`value` text CHARACTER SET utf8 COLLATE utf8_general_ci, | |
`default_value` text CHARACTER SET utf8 COLLATE utf8_general_ci, | |
`suffix` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL, | |
`remark` text CHARACTER SET utf8 COLLATE utf8_general_ci, | |
`created` datetime DEFAULT NULL, | |
`modified` datetime DEFAULT NULL, | |
PRIMARY KEY (`id`), | |
KEY `fk_configs_section` (`config_section_id`), | |
KEY `idx_configs_name` (`name`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; | |
/*!40101 SET character_set_client = @saved_cs_client */; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment