|
| 1 | +-- MySQL dump 10.13 Distrib 8.0.41, for Win64 (x86_64) |
| 2 | +-- |
| 3 | +-- Host: 127.0.0.1 Database: jsonms_local |
| 4 | +-- ------------------------------------------------------ |
| 5 | +-- Server version 8.0.41 |
| 6 | + |
| 7 | +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; |
| 8 | +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; |
| 9 | +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; |
| 10 | +/*!50503 SET NAMES utf8mb4 */; |
| 11 | +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; |
| 12 | +/*!40103 SET TIME_ZONE='+00:00' */; |
| 13 | +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; |
| 14 | +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; |
| 15 | +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; |
| 16 | +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; |
| 17 | + |
| 18 | +-- |
| 19 | +-- Table structure for table `errors` |
| 20 | +-- |
| 21 | + |
| 22 | +DROP TABLE IF EXISTS `errors`; |
| 23 | +/*!40101 SET @saved_cs_client = @@character_set_client */; |
| 24 | +/*!50503 SET character_set_client = utf8mb4 */; |
| 25 | +CREATE TABLE `errors` ( |
| 26 | + `id` int unsigned NOT NULL AUTO_INCREMENT, |
| 27 | + `key` varchar(255) NOT NULL, |
| 28 | + `message` text, |
| 29 | + `source` varchar(256) DEFAULT NULL, |
| 30 | + `line` smallint DEFAULT NULL, |
| 31 | + `column` smallint DEFAULT NULL, |
| 32 | + `stack` text, |
| 33 | + `occurred_on` datetime NOT NULL, |
| 34 | + `last_timestamp` bigint NOT NULL, |
| 35 | + `version` varchar(16) NOT NULL, |
| 36 | + `route` varchar(128) NOT NULL, |
| 37 | + `count` smallint NOT NULL DEFAULT '0', |
| 38 | + `user_agent` varchar(255) NOT NULL, |
| 39 | + `created_on` datetime DEFAULT (now()), |
| 40 | + `created_by` int unsigned NOT NULL, |
| 41 | + `updated_at` datetime DEFAULT CURRENT_TIMESTAMP, |
| 42 | + PRIMARY KEY (`id`), |
| 43 | + UNIQUE KEY `errors_pk` (`key`) |
| 44 | +) ENGINE=InnoDB AUTO_INCREMENT=88 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; |
| 45 | +/*!40101 SET character_set_client = @saved_cs_client */; |
| 46 | + |
| 47 | +-- |
| 48 | +-- Table structure for table `history` |
| 49 | +-- |
| 50 | + |
| 51 | +DROP TABLE IF EXISTS `history`; |
| 52 | +/*!40101 SET @saved_cs_client = @@character_set_client */; |
| 53 | +/*!50503 SET character_set_client = utf8mb4 */; |
| 54 | +CREATE TABLE `history` ( |
| 55 | + `id` int NOT NULL AUTO_INCREMENT, |
| 56 | + `uuid` char(36) COLLATE utf8mb4_unicode_ci NOT NULL, |
| 57 | + `content` text COLLATE utf8mb4_unicode_ci NOT NULL, |
| 58 | + `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, |
| 59 | + `created_by` int DEFAULT NULL, |
| 60 | + PRIMARY KEY (`id`), |
| 61 | + KEY `history_interfaces_uuid_fk` (`uuid`), |
| 62 | + KEY `history_users_id_fk` (`created_by`), |
| 63 | + CONSTRAINT `history_interfaces_uuid_fk` FOREIGN KEY (`uuid`) REFERENCES `structures` (`uuid`) ON DELETE CASCADE, |
| 64 | + CONSTRAINT `history_users_id_fk` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) |
| 65 | +) ENGINE=InnoDB AUTO_INCREMENT=378 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
| 66 | +/*!40101 SET character_set_client = @saved_cs_client */; |
| 67 | + |
| 68 | +-- |
| 69 | +-- Table structure for table `permissions` |
| 70 | +-- |
| 71 | + |
| 72 | +DROP TABLE IF EXISTS `permissions`; |
| 73 | +/*!40101 SET @saved_cs_client = @@character_set_client */; |
| 74 | +/*!50503 SET character_set_client = utf8mb4 */; |
| 75 | +CREATE TABLE `permissions` ( |
| 76 | + `id` int NOT NULL AUTO_INCREMENT, |
| 77 | + `structure_uuid` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL, |
| 78 | + `type` enum('admin','interface') COLLATE utf8mb4_unicode_ci NOT NULL, |
| 79 | + `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, |
| 80 | + PRIMARY KEY (`id`) |
| 81 | +) ENGINE=InnoDB AUTO_INCREMENT=57 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
| 82 | +/*!40101 SET character_set_client = @saved_cs_client */; |
| 83 | + |
| 84 | +-- |
| 85 | +-- Table structure for table `structures` |
| 86 | +-- |
| 87 | + |
| 88 | +DROP TABLE IF EXISTS `structures`; |
| 89 | +/*!40101 SET @saved_cs_client = @@character_set_client */; |
| 90 | +/*!50503 SET character_set_client = utf8mb4 */; |
| 91 | +CREATE TABLE `structures` ( |
| 92 | + `uuid` char(36) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT (uuid()), |
| 93 | + `hash` char(10) COLLATE utf8mb4_unicode_ci NOT NULL, |
| 94 | + `label` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL, |
| 95 | + `logo` varchar(1024) COLLATE utf8mb4_unicode_ci DEFAULT NULL, |
| 96 | + `content` text COLLATE utf8mb4_unicode_ci NOT NULL, |
| 97 | + `webhook` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL, |
| 98 | + `created_by` int NOT NULL, |
| 99 | + `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, |
| 100 | + `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, |
| 101 | + PRIMARY KEY (`uuid`), |
| 102 | + KEY `interfaces_users_id_fk` (`created_by`), |
| 103 | + KEY `interfaces__hash_index` (`hash`), |
| 104 | + KEY `interfaces_webhooks_uuid_fk` (`webhook`), |
| 105 | + CONSTRAINT `interfaces_users_id_fk` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`), |
| 106 | + CONSTRAINT `interfaces_webhooks_uuid_fk` FOREIGN KEY (`webhook`) REFERENCES `webhooks` (`uuid`) |
| 107 | +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
| 108 | +/*!40101 SET character_set_client = @saved_cs_client */; |
| 109 | + |
| 110 | +-- |
| 111 | +-- Table structure for table `users` |
| 112 | +-- |
| 113 | + |
| 114 | +DROP TABLE IF EXISTS `users`; |
| 115 | +/*!40101 SET @saved_cs_client = @@character_set_client */; |
| 116 | +/*!50503 SET character_set_client = utf8mb4 */; |
| 117 | +CREATE TABLE `users` ( |
| 118 | + `id` int NOT NULL AUTO_INCREMENT, |
| 119 | + `google_id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, |
| 120 | + `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, |
| 121 | + `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, |
| 122 | + `avatar` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, |
| 123 | + `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP, |
| 124 | + PRIMARY KEY (`id`), |
| 125 | + UNIQUE KEY `google_id` (`google_id`) |
| 126 | +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
| 127 | +/*!40101 SET character_set_client = @saved_cs_client */; |
| 128 | + |
| 129 | +-- |
| 130 | +-- Table structure for table `webhooks` |
| 131 | +-- |
| 132 | + |
| 133 | +DROP TABLE IF EXISTS `webhooks`; |
| 134 | +/*!40101 SET @saved_cs_client = @@character_set_client */; |
| 135 | +/*!50503 SET character_set_client = utf8mb4 */; |
| 136 | +CREATE TABLE `webhooks` ( |
| 137 | + `uuid` char(36) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT (uuid()), |
| 138 | + `url` varchar(1024) COLLATE utf8mb4_unicode_ci DEFAULT NULL, |
| 139 | + `secret` varchar(84) COLLATE utf8mb4_unicode_ci NOT NULL, |
| 140 | + `cypher` varchar(84) COLLATE utf8mb4_unicode_ci NOT NULL, |
| 141 | + `created_by` int NOT NULL, |
| 142 | + `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, |
| 143 | + `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, |
| 144 | + PRIMARY KEY (`uuid`), |
| 145 | + KEY `interfaces_webhooks_users_id_fk` (`created_by`), |
| 146 | + CONSTRAINT `interfaces_webhooks_users_id_fk` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) |
| 147 | +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
| 148 | +/*!40101 SET character_set_client = @saved_cs_client */; |
| 149 | +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; |
| 150 | + |
| 151 | +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; |
| 152 | +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; |
| 153 | +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; |
| 154 | +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; |
| 155 | +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; |
| 156 | +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; |
| 157 | +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; |
| 158 | + |
| 159 | +-- Dump completed on 2025-04-26 18:13:45 |
0 commit comments