github.com/vnforks/kid/v5@v5.22.1-0.20200408055009-b89d99c65676/scripts/mattermost-mysql-5.0.sql (about) 1 -- MySQL dump 10.13 Distrib 5.7.25, for Linux (x86_64) 2 -- 3 -- Host: 127.0.0.1 Database: mattermost_test 4 -- ------------------------------------------------------ 5 -- Server version 5.7.23 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 /*!40101 SET NAMES utf8 */; 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 `Audits` 20 -- 21 22 DROP TABLE IF EXISTS `Audits`; 23 /*!40101 SET @saved_cs_client = @@character_set_client */; 24 /*!40101 SET character_set_client = utf8 */; 25 CREATE TABLE `Audits` ( 26 `Id` varchar(26) NOT NULL, 27 `CreateAt` bigint(20) DEFAULT NULL, 28 `UserId` varchar(26) DEFAULT NULL, 29 `Action` text, 30 `ExtraInfo` text, 31 `IpAddress` varchar(64) DEFAULT NULL, 32 `SessionId` varchar(26) DEFAULT NULL, 33 PRIMARY KEY (`Id`), 34 KEY `idx_audits_user_id` (`UserId`) 35 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 36 /*!40101 SET character_set_client = @saved_cs_client */; 37 38 -- 39 -- Dumping data for table `Audits` 40 -- 41 42 LOCK TABLES `Audits` WRITE; 43 /*!40000 ALTER TABLE `Audits` DISABLE KEYS */; 44 /*!40000 ALTER TABLE `Audits` ENABLE KEYS */; 45 UNLOCK TABLES; 46 47 -- 48 -- Table structure for table `ClassMemberHistory` 49 -- 50 51 DROP TABLE IF EXISTS `ClassMemberHistory`; 52 /*!40101 SET @saved_cs_client = @@character_set_client */; 53 /*!40101 SET character_set_client = utf8 */; 54 CREATE TABLE `ClassMemberHistory` ( 55 `ClassId` varchar(26) NOT NULL, 56 `UserId` varchar(26) NOT NULL, 57 `JoinTime` bigint(20) NOT NULL, 58 `LeaveTime` bigint(20) DEFAULT NULL, 59 PRIMARY KEY (`ClassId`,`UserId`,`JoinTime`) 60 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 61 /*!40101 SET character_set_client = @saved_cs_client */; 62 63 -- 64 -- Dumping data for table `ClassMemberHistory` 65 -- 66 67 LOCK TABLES `ClassMemberHistory` WRITE; 68 /*!40000 ALTER TABLE `ClassMemberHistory` DISABLE KEYS */; 69 /*!40000 ALTER TABLE `ClassMemberHistory` ENABLE KEYS */; 70 UNLOCK TABLES; 71 72 -- 73 -- Table structure for table `ClassMembers` 74 -- 75 76 DROP TABLE IF EXISTS `ClassMembers`; 77 /*!40101 SET @saved_cs_client = @@character_set_client */; 78 /*!40101 SET character_set_client = utf8 */; 79 CREATE TABLE `ClassMembers` ( 80 `ClassId` varchar(26) NOT NULL, 81 `UserId` varchar(26) NOT NULL, 82 `Roles` varchar(64) DEFAULT NULL, 83 `LastViewedAt` bigint(20) DEFAULT NULL, 84 `MsgCount` bigint(20) DEFAULT NULL, 85 `MentionCount` bigint(20) DEFAULT NULL, 86 `NotifyProps` text, 87 `LastUpdateAt` bigint(20) DEFAULT NULL, 88 `SchemeUser` tinyint(4) DEFAULT NULL, 89 `SchemeAdmin` tinyint(4) DEFAULT NULL, 90 PRIMARY KEY (`ClassId`,`UserId`), 91 KEY `idx_classmembers_class_id` (`ClassId`), 92 KEY `idx_classmembers_user_id` (`UserId`) 93 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 94 /*!40101 SET character_set_client = @saved_cs_client */; 95 96 -- 97 -- Dumping data for table `ClassMembers` 98 -- 99 100 LOCK TABLES `ClassMembers` WRITE; 101 /*!40000 ALTER TABLE `ClassMembers` DISABLE KEYS */; 102 /*!40000 ALTER TABLE `ClassMembers` ENABLE KEYS */; 103 UNLOCK TABLES; 104 105 -- 106 -- Table structure for table `Classes` 107 -- 108 109 DROP TABLE IF EXISTS `Classes`; 110 /*!40101 SET @saved_cs_client = @@character_set_client */; 111 /*!40101 SET character_set_client = utf8 */; 112 CREATE TABLE `Classes` ( 113 `Id` varchar(26) NOT NULL, 114 `CreateAt` bigint(20) DEFAULT NULL, 115 `UpdateAt` bigint(20) DEFAULT NULL, 116 `DeleteAt` bigint(20) DEFAULT NULL, 117 `BranchId` varchar(26) DEFAULT NULL, 118 `Type` varchar(1) DEFAULT NULL, 119 `DisplayName` varchar(64) DEFAULT NULL, 120 `Name` varchar(64) DEFAULT NULL, 121 `Header` text, 122 `Purpose` varchar(250) DEFAULT NULL, 123 `LastPostAt` bigint(20) DEFAULT NULL, 124 `TotalMsgCount` bigint(20) DEFAULT NULL, 125 `ExtraUpdateAt` bigint(20) DEFAULT NULL, 126 `CreatorId` varchar(26) DEFAULT NULL, 127 `SchemeId` varchar(26) DEFAULT NULL, 128 PRIMARY KEY (`Id`), 129 UNIQUE KEY `Name` (`Name`,`BranchId`), 130 KEY `idx_classes_branch_id` (`BranchId`), 131 KEY `idx_classes_name` (`Name`), 132 KEY `idx_classes_update_at` (`UpdateAt`), 133 KEY `idx_classes_create_at` (`CreateAt`), 134 KEY `idx_classes_delete_at` (`DeleteAt`), 135 FULLTEXT KEY `idx_classes_txt` (`Name`,`DisplayName`) 136 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 137 /*!40101 SET character_set_client = @saved_cs_client */; 138 139 -- 140 -- Dumping data for table `Classes` 141 -- 142 143 LOCK TABLES `Classes` WRITE; 144 /*!40000 ALTER TABLE `Classes` DISABLE KEYS */; 145 /*!40000 ALTER TABLE `Classes` ENABLE KEYS */; 146 UNLOCK TABLES; 147 148 -- 149 -- Table structure for table `ClusterDiscovery` 150 -- 151 152 DROP TABLE IF EXISTS `ClusterDiscovery`; 153 /*!40101 SET @saved_cs_client = @@character_set_client */; 154 /*!40101 SET character_set_client = utf8 */; 155 CREATE TABLE `ClusterDiscovery` ( 156 `Id` varchar(26) NOT NULL, 157 `Type` varchar(64) DEFAULT NULL, 158 `ClusterName` varchar(64) DEFAULT NULL, 159 `Hostname` text, 160 `GossipPort` int(11) DEFAULT NULL, 161 `Port` int(11) DEFAULT NULL, 162 `CreateAt` bigint(20) DEFAULT NULL, 163 `LastPingAt` bigint(20) DEFAULT NULL, 164 PRIMARY KEY (`Id`) 165 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 166 /*!40101 SET character_set_client = @saved_cs_client */; 167 168 -- 169 -- Dumping data for table `ClusterDiscovery` 170 -- 171 172 LOCK TABLES `ClusterDiscovery` WRITE; 173 /*!40000 ALTER TABLE `ClusterDiscovery` DISABLE KEYS */; 174 /*!40000 ALTER TABLE `ClusterDiscovery` ENABLE KEYS */; 175 UNLOCK TABLES; 176 177 -- 178 -- Table structure for table `CommandWebhooks` 179 -- 180 181 DROP TABLE IF EXISTS `CommandWebhooks`; 182 /*!40101 SET @saved_cs_client = @@character_set_client */; 183 /*!40101 SET character_set_client = utf8 */; 184 CREATE TABLE `CommandWebhooks` ( 185 `Id` varchar(26) NOT NULL, 186 `CreateAt` bigint(20) DEFAULT NULL, 187 `CommandId` varchar(26) DEFAULT NULL, 188 `UserId` varchar(26) DEFAULT NULL, 189 `ClassId` varchar(26) DEFAULT NULL, 190 `RootId` varchar(26) DEFAULT NULL, 191 `ParentId` varchar(26) DEFAULT NULL, 192 `UseCount` int(11) DEFAULT NULL, 193 PRIMARY KEY (`Id`), 194 KEY `idx_command_webhook_create_at` (`CreateAt`) 195 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 196 /*!40101 SET character_set_client = @saved_cs_client */; 197 198 -- 199 -- Dumping data for table `CommandWebhooks` 200 -- 201 202 LOCK TABLES `CommandWebhooks` WRITE; 203 /*!40000 ALTER TABLE `CommandWebhooks` DISABLE KEYS */; 204 /*!40000 ALTER TABLE `CommandWebhooks` ENABLE KEYS */; 205 UNLOCK TABLES; 206 207 -- 208 -- Table structure for table `Commands` 209 -- 210 211 DROP TABLE IF EXISTS `Commands`; 212 /*!40101 SET @saved_cs_client = @@character_set_client */; 213 /*!40101 SET character_set_client = utf8 */; 214 CREATE TABLE `Commands` ( 215 `Id` varchar(26) NOT NULL, 216 `Token` varchar(26) DEFAULT NULL, 217 `CreateAt` bigint(20) DEFAULT NULL, 218 `UpdateAt` bigint(20) DEFAULT NULL, 219 `DeleteAt` bigint(20) DEFAULT NULL, 220 `CreatorId` varchar(26) DEFAULT NULL, 221 `BranchId` varchar(26) DEFAULT NULL, 222 `Trigger` varchar(128) DEFAULT NULL, 223 `Method` varchar(1) DEFAULT NULL, 224 `Username` varchar(64) DEFAULT NULL, 225 `IconURL` text, 226 `AutoComplete` tinyint(1) DEFAULT NULL, 227 `AutoCompleteDesc` text, 228 `AutoCompleteHint` text, 229 `DisplayName` varchar(64) DEFAULT NULL, 230 `Description` varchar(128) DEFAULT NULL, 231 `URL` text, 232 PRIMARY KEY (`Id`), 233 KEY `idx_command_branch_id` (`BranchId`), 234 KEY `idx_command_update_at` (`UpdateAt`), 235 KEY `idx_command_create_at` (`CreateAt`), 236 KEY `idx_command_delete_at` (`DeleteAt`) 237 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 238 /*!40101 SET character_set_client = @saved_cs_client */; 239 240 -- 241 -- Dumping data for table `Commands` 242 -- 243 244 LOCK TABLES `Commands` WRITE; 245 /*!40000 ALTER TABLE `Commands` DISABLE KEYS */; 246 /*!40000 ALTER TABLE `Commands` ENABLE KEYS */; 247 UNLOCK TABLES; 248 249 -- 250 -- Table structure for table `Compliances` 251 -- 252 253 DROP TABLE IF EXISTS `Compliances`; 254 /*!40101 SET @saved_cs_client = @@character_set_client */; 255 /*!40101 SET character_set_client = utf8 */; 256 CREATE TABLE `Compliances` ( 257 `Id` varchar(26) NOT NULL, 258 `CreateAt` bigint(20) DEFAULT NULL, 259 `UserId` varchar(26) DEFAULT NULL, 260 `Status` varchar(64) DEFAULT NULL, 261 `Count` int(11) DEFAULT NULL, 262 `Desc` text, 263 `Type` varchar(64) DEFAULT NULL, 264 `StartAt` bigint(20) DEFAULT NULL, 265 `EndAt` bigint(20) DEFAULT NULL, 266 `Keywords` text, 267 `Emails` text, 268 PRIMARY KEY (`Id`) 269 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 270 /*!40101 SET character_set_client = @saved_cs_client */; 271 272 -- 273 -- Dumping data for table `Compliances` 274 -- 275 276 LOCK TABLES `Compliances` WRITE; 277 /*!40000 ALTER TABLE `Compliances` DISABLE KEYS */; 278 /*!40000 ALTER TABLE `Compliances` ENABLE KEYS */; 279 UNLOCK TABLES; 280 281 -- 282 -- Table structure for table `Emoji` 283 -- 284 285 DROP TABLE IF EXISTS `Emoji`; 286 /*!40101 SET @saved_cs_client = @@character_set_client */; 287 /*!40101 SET character_set_client = utf8 */; 288 CREATE TABLE `Emoji` ( 289 `Id` varchar(26) NOT NULL, 290 `CreateAt` bigint(20) DEFAULT NULL, 291 `UpdateAt` bigint(20) DEFAULT NULL, 292 `DeleteAt` bigint(20) DEFAULT NULL, 293 `CreatorId` varchar(26) DEFAULT NULL, 294 `Name` varchar(64) DEFAULT NULL, 295 PRIMARY KEY (`Id`), 296 UNIQUE KEY `Name` (`Name`,`DeleteAt`), 297 KEY `idx_emoji_update_at` (`UpdateAt`), 298 KEY `idx_emoji_create_at` (`CreateAt`), 299 KEY `idx_emoji_delete_at` (`DeleteAt`), 300 KEY `idx_emoji_name` (`Name`) 301 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 302 /*!40101 SET character_set_client = @saved_cs_client */; 303 304 -- 305 -- Dumping data for table `Emoji` 306 -- 307 308 LOCK TABLES `Emoji` WRITE; 309 /*!40000 ALTER TABLE `Emoji` DISABLE KEYS */; 310 /*!40000 ALTER TABLE `Emoji` ENABLE KEYS */; 311 UNLOCK TABLES; 312 313 -- 314 -- Table structure for table `FileInfo` 315 -- 316 317 DROP TABLE IF EXISTS `FileInfo`; 318 /*!40101 SET @saved_cs_client = @@character_set_client */; 319 /*!40101 SET character_set_client = utf8 */; 320 CREATE TABLE `FileInfo` ( 321 `Id` varchar(26) NOT NULL, 322 `CreatorId` varchar(26) DEFAULT NULL, 323 `PostId` varchar(26) DEFAULT NULL, 324 `CreateAt` bigint(20) DEFAULT NULL, 325 `UpdateAt` bigint(20) DEFAULT NULL, 326 `DeleteAt` bigint(20) DEFAULT NULL, 327 `Path` text, 328 `ThumbnailPath` text, 329 `PreviewPath` text, 330 `Name` text, 331 `Extension` varchar(64) DEFAULT NULL, 332 `Size` bigint(20) DEFAULT NULL, 333 `MimeType` text, 334 `Width` int(11) DEFAULT NULL, 335 `Height` int(11) DEFAULT NULL, 336 `HasPreviewImage` tinyint(1) DEFAULT NULL, 337 PRIMARY KEY (`Id`), 338 KEY `idx_fileinfo_update_at` (`UpdateAt`), 339 KEY `idx_fileinfo_create_at` (`CreateAt`), 340 KEY `idx_fileinfo_delete_at` (`DeleteAt`), 341 KEY `idx_fileinfo_postid_at` (`PostId`) 342 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 343 /*!40101 SET character_set_client = @saved_cs_client */; 344 345 -- 346 -- Dumping data for table `FileInfo` 347 -- 348 349 LOCK TABLES `FileInfo` WRITE; 350 /*!40000 ALTER TABLE `FileInfo` DISABLE KEYS */; 351 /*!40000 ALTER TABLE `FileInfo` ENABLE KEYS */; 352 UNLOCK TABLES; 353 354 -- 355 -- Table structure for table `IncomingWebhooks` 356 -- 357 358 DROP TABLE IF EXISTS `IncomingWebhooks`; 359 /*!40101 SET @saved_cs_client = @@character_set_client */; 360 /*!40101 SET character_set_client = utf8 */; 361 CREATE TABLE `IncomingWebhooks` ( 362 `Id` varchar(26) NOT NULL, 363 `CreateAt` bigint(20) DEFAULT NULL, 364 `UpdateAt` bigint(20) DEFAULT NULL, 365 `DeleteAt` bigint(20) DEFAULT NULL, 366 `UserId` varchar(26) DEFAULT NULL, 367 `ClassId` varchar(26) DEFAULT NULL, 368 `BranchId` varchar(26) DEFAULT NULL, 369 `DisplayName` varchar(64) DEFAULT NULL, 370 `Description` varchar(128) DEFAULT NULL, 371 `Username` varchar(255) DEFAULT NULL, 372 `IconURL` varchar(255) DEFAULT NULL, 373 `ClassLocked` tinyint(1) DEFAULT NULL, 374 PRIMARY KEY (`Id`), 375 KEY `idx_incoming_webhook_user_id` (`UserId`), 376 KEY `idx_incoming_webhook_branch_id` (`BranchId`), 377 KEY `idx_incoming_webhook_update_at` (`UpdateAt`), 378 KEY `idx_incoming_webhook_create_at` (`CreateAt`), 379 KEY `idx_incoming_webhook_delete_at` (`DeleteAt`) 380 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 381 /*!40101 SET character_set_client = @saved_cs_client */; 382 383 -- 384 -- Dumping data for table `IncomingWebhooks` 385 -- 386 387 LOCK TABLES `IncomingWebhooks` WRITE; 388 /*!40000 ALTER TABLE `IncomingWebhooks` DISABLE KEYS */; 389 /*!40000 ALTER TABLE `IncomingWebhooks` ENABLE KEYS */; 390 UNLOCK TABLES; 391 392 -- 393 -- Table structure for table `Jobs` 394 -- 395 396 DROP TABLE IF EXISTS `Jobs`; 397 /*!40101 SET @saved_cs_client = @@character_set_client */; 398 /*!40101 SET character_set_client = utf8 */; 399 CREATE TABLE `Jobs` ( 400 `Id` varchar(26) NOT NULL, 401 `Type` varchar(32) DEFAULT NULL, 402 `Priority` bigint(20) DEFAULT NULL, 403 `CreateAt` bigint(20) DEFAULT NULL, 404 `StartAt` bigint(20) DEFAULT NULL, 405 `LastActivityAt` bigint(20) DEFAULT NULL, 406 `Status` varchar(32) DEFAULT NULL, 407 `Progress` bigint(20) DEFAULT NULL, 408 `Data` text, 409 PRIMARY KEY (`Id`), 410 KEY `idx_jobs_type` (`Type`) 411 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 412 /*!40101 SET character_set_client = @saved_cs_client */; 413 414 -- 415 -- Dumping data for table `Jobs` 416 -- 417 418 LOCK TABLES `Jobs` WRITE; 419 /*!40000 ALTER TABLE `Jobs` DISABLE KEYS */; 420 /*!40000 ALTER TABLE `Jobs` ENABLE KEYS */; 421 UNLOCK TABLES; 422 423 -- 424 -- Table structure for table `Licenses` 425 -- 426 427 DROP TABLE IF EXISTS `Licenses`; 428 /*!40101 SET @saved_cs_client = @@character_set_client */; 429 /*!40101 SET character_set_client = utf8 */; 430 CREATE TABLE `Licenses` ( 431 `Id` varchar(26) NOT NULL, 432 `CreateAt` bigint(20) DEFAULT NULL, 433 `Bytes` text, 434 PRIMARY KEY (`Id`) 435 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 436 /*!40101 SET character_set_client = @saved_cs_client */; 437 438 -- 439 -- Dumping data for table `Licenses` 440 -- 441 442 LOCK TABLES `Licenses` WRITE; 443 /*!40000 ALTER TABLE `Licenses` DISABLE KEYS */; 444 /*!40000 ALTER TABLE `Licenses` ENABLE KEYS */; 445 UNLOCK TABLES; 446 447 -- 448 -- Table structure for table `OAuthAccessData` 449 -- 450 451 DROP TABLE IF EXISTS `OAuthAccessData`; 452 /*!40101 SET @saved_cs_client = @@character_set_client */; 453 /*!40101 SET character_set_client = utf8 */; 454 CREATE TABLE `OAuthAccessData` ( 455 `ClientId` varchar(26) DEFAULT NULL, 456 `UserId` varchar(26) DEFAULT NULL, 457 `Token` varchar(26) NOT NULL, 458 `RefreshToken` varchar(26) DEFAULT NULL, 459 `RedirectUri` text, 460 `ExpiresAt` bigint(20) DEFAULT NULL, 461 `Scope` varchar(128) DEFAULT NULL, 462 PRIMARY KEY (`Token`), 463 UNIQUE KEY `ClientId` (`ClientId`,`UserId`), 464 KEY `idx_oauthaccessdata_client_id` (`ClientId`), 465 KEY `idx_oauthaccessdata_user_id` (`UserId`), 466 KEY `idx_oauthaccessdata_refresh_token` (`RefreshToken`) 467 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 468 /*!40101 SET character_set_client = @saved_cs_client */; 469 470 -- 471 -- Dumping data for table `OAuthAccessData` 472 -- 473 474 LOCK TABLES `OAuthAccessData` WRITE; 475 /*!40000 ALTER TABLE `OAuthAccessData` DISABLE KEYS */; 476 /*!40000 ALTER TABLE `OAuthAccessData` ENABLE KEYS */; 477 UNLOCK TABLES; 478 479 -- 480 -- Table structure for table `OAuthApps` 481 -- 482 483 DROP TABLE IF EXISTS `OAuthApps`; 484 /*!40101 SET @saved_cs_client = @@character_set_client */; 485 /*!40101 SET character_set_client = utf8 */; 486 CREATE TABLE `OAuthApps` ( 487 `Id` varchar(26) NOT NULL, 488 `CreatorId` varchar(26) DEFAULT NULL, 489 `CreateAt` bigint(20) DEFAULT NULL, 490 `UpdateAt` bigint(20) DEFAULT NULL, 491 `ClientSecret` varchar(128) DEFAULT NULL, 492 `Name` varchar(64) DEFAULT NULL, 493 `Description` text, 494 `IconURL` text, 495 `CallbackUrls` text, 496 `Homepage` text, 497 `IsTrusted` tinyint(1) DEFAULT NULL, 498 PRIMARY KEY (`Id`), 499 KEY `idx_oauthapps_creator_id` (`CreatorId`) 500 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 501 /*!40101 SET character_set_client = @saved_cs_client */; 502 503 -- 504 -- Dumping data for table `OAuthApps` 505 -- 506 507 LOCK TABLES `OAuthApps` WRITE; 508 /*!40000 ALTER TABLE `OAuthApps` DISABLE KEYS */; 509 /*!40000 ALTER TABLE `OAuthApps` ENABLE KEYS */; 510 UNLOCK TABLES; 511 512 -- 513 -- Table structure for table `OAuthAuthData` 514 -- 515 516 DROP TABLE IF EXISTS `OAuthAuthData`; 517 /*!40101 SET @saved_cs_client = @@character_set_client */; 518 /*!40101 SET character_set_client = utf8 */; 519 CREATE TABLE `OAuthAuthData` ( 520 `ClientId` varchar(26) DEFAULT NULL, 521 `UserId` varchar(26) DEFAULT NULL, 522 `Code` varchar(128) NOT NULL, 523 `ExpiresIn` int(11) DEFAULT NULL, 524 `CreateAt` bigint(20) DEFAULT NULL, 525 `RedirectUri` text, 526 `State` text, 527 `Scope` varchar(128) DEFAULT NULL, 528 PRIMARY KEY (`Code`), 529 KEY `idx_oauthauthdata_client_id` (`Code`) 530 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 531 /*!40101 SET character_set_client = @saved_cs_client */; 532 533 -- 534 -- Dumping data for table `OAuthAuthData` 535 -- 536 537 LOCK TABLES `OAuthAuthData` WRITE; 538 /*!40000 ALTER TABLE `OAuthAuthData` DISABLE KEYS */; 539 /*!40000 ALTER TABLE `OAuthAuthData` ENABLE KEYS */; 540 UNLOCK TABLES; 541 542 -- 543 -- Table structure for table `OutgoingWebhooks` 544 -- 545 546 DROP TABLE IF EXISTS `OutgoingWebhooks`; 547 /*!40101 SET @saved_cs_client = @@character_set_client */; 548 /*!40101 SET character_set_client = utf8 */; 549 CREATE TABLE `OutgoingWebhooks` ( 550 `Id` varchar(26) NOT NULL, 551 `Token` varchar(26) DEFAULT NULL, 552 `CreateAt` bigint(20) DEFAULT NULL, 553 `UpdateAt` bigint(20) DEFAULT NULL, 554 `DeleteAt` bigint(20) DEFAULT NULL, 555 `CreatorId` varchar(26) DEFAULT NULL, 556 `ClassId` varchar(26) DEFAULT NULL, 557 `BranchId` varchar(26) DEFAULT NULL, 558 `TriggerWords` text, 559 `TriggerWhen` int(11) DEFAULT NULL, 560 `CallbackURLs` text, 561 `DisplayName` varchar(64) DEFAULT NULL, 562 `Description` varchar(128) DEFAULT NULL, 563 `ContentType` varchar(128) DEFAULT NULL, 564 PRIMARY KEY (`Id`), 565 KEY `idx_outgoing_webhook_branch_id` (`BranchId`), 566 KEY `idx_outgoing_webhook_update_at` (`UpdateAt`), 567 KEY `idx_outgoing_webhook_create_at` (`CreateAt`), 568 KEY `idx_outgoing_webhook_delete_at` (`DeleteAt`) 569 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 570 /*!40101 SET character_set_client = @saved_cs_client */; 571 572 -- 573 -- Dumping data for table `OutgoingWebhooks` 574 -- 575 576 LOCK TABLES `OutgoingWebhooks` WRITE; 577 /*!40000 ALTER TABLE `OutgoingWebhooks` DISABLE KEYS */; 578 /*!40000 ALTER TABLE `OutgoingWebhooks` ENABLE KEYS */; 579 UNLOCK TABLES; 580 581 -- 582 -- Table structure for table `PluginKeyValueStore` 583 -- 584 585 DROP TABLE IF EXISTS `PluginKeyValueStore`; 586 /*!40101 SET @saved_cs_client = @@character_set_client */; 587 /*!40101 SET character_set_client = utf8 */; 588 CREATE TABLE `PluginKeyValueStore` ( 589 `PluginId` varchar(190) NOT NULL, 590 `PKey` varchar(50) NOT NULL, 591 `PValue` mediumblob, 592 PRIMARY KEY (`PluginId`,`PKey`) 593 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 594 /*!40101 SET character_set_client = @saved_cs_client */; 595 596 -- 597 -- Dumping data for table `PluginKeyValueStore` 598 -- 599 600 LOCK TABLES `PluginKeyValueStore` WRITE; 601 /*!40000 ALTER TABLE `PluginKeyValueStore` DISABLE KEYS */; 602 /*!40000 ALTER TABLE `PluginKeyValueStore` ENABLE KEYS */; 603 UNLOCK TABLES; 604 605 -- 606 -- Table structure for table `Posts` 607 -- 608 609 DROP TABLE IF EXISTS `Posts`; 610 /*!40101 SET @saved_cs_client = @@character_set_client */; 611 /*!40101 SET character_set_client = utf8 */; 612 CREATE TABLE `Posts` ( 613 `Id` varchar(26) NOT NULL, 614 `CreateAt` bigint(20) DEFAULT NULL, 615 `UpdateAt` bigint(20) DEFAULT NULL, 616 `EditAt` bigint(20) DEFAULT NULL, 617 `DeleteAt` bigint(20) DEFAULT NULL, 618 `IsPinned` tinyint(1) DEFAULT NULL, 619 `UserId` varchar(26) DEFAULT NULL, 620 `ClassId` varchar(26) DEFAULT NULL, 621 `RootId` varchar(26) DEFAULT NULL, 622 `ParentId` varchar(26) DEFAULT NULL, 623 `OriginalId` varchar(26) DEFAULT NULL, 624 `Message` text, 625 `Type` varchar(26) DEFAULT NULL, 626 `Props` text, 627 `Hashtags` text, 628 `Filenames` text, 629 `FileIds` varchar(150) DEFAULT NULL, 630 `HasReactions` tinyint(1) DEFAULT NULL, 631 PRIMARY KEY (`Id`), 632 KEY `idx_posts_update_at` (`UpdateAt`), 633 KEY `idx_posts_create_at` (`CreateAt`), 634 KEY `idx_posts_delete_at` (`DeleteAt`), 635 KEY `idx_posts_class_id` (`ClassId`), 636 KEY `idx_posts_root_id` (`RootId`), 637 KEY `idx_posts_user_id` (`UserId`), 638 KEY `idx_posts_is_pinned` (`IsPinned`), 639 KEY `idx_posts_class_id_update_at` (`ClassId`,`UpdateAt`), 640 KEY `idx_posts_class_id_delete_at_create_at` (`ClassId`,`DeleteAt`,`CreateAt`), 641 FULLTEXT KEY `idx_posts_message_txt` (`Message`), 642 FULLTEXT KEY `idx_posts_hashtags_txt` (`Hashtags`) 643 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 644 /*!40101 SET character_set_client = @saved_cs_client */; 645 646 -- 647 -- Dumping data for table `Posts` 648 -- 649 650 LOCK TABLES `Posts` WRITE; 651 /*!40000 ALTER TABLE `Posts` DISABLE KEYS */; 652 /*!40000 ALTER TABLE `Posts` ENABLE KEYS */; 653 UNLOCK TABLES; 654 655 -- 656 -- Table structure for table `Preferences` 657 -- 658 659 DROP TABLE IF EXISTS `Preferences`; 660 /*!40101 SET @saved_cs_client = @@character_set_client */; 661 /*!40101 SET character_set_client = utf8 */; 662 CREATE TABLE `Preferences` ( 663 `UserId` varchar(26) NOT NULL, 664 `Category` varchar(32) NOT NULL, 665 `Name` varchar(32) NOT NULL, 666 `Value` text, 667 PRIMARY KEY (`UserId`,`Category`,`Name`), 668 KEY `idx_preferences_user_id` (`UserId`), 669 KEY `idx_preferences_category` (`Category`), 670 KEY `idx_preferences_name` (`Name`) 671 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 672 /*!40101 SET character_set_client = @saved_cs_client */; 673 674 -- 675 -- Dumping data for table `Preferences` 676 -- 677 678 LOCK TABLES `Preferences` WRITE; 679 /*!40000 ALTER TABLE `Preferences` DISABLE KEYS */; 680 /*!40000 ALTER TABLE `Preferences` ENABLE KEYS */; 681 UNLOCK TABLES; 682 683 -- 684 -- Table structure for table `Reactions` 685 -- 686 687 DROP TABLE IF EXISTS `Reactions`; 688 /*!40101 SET @saved_cs_client = @@character_set_client */; 689 /*!40101 SET character_set_client = utf8 */; 690 CREATE TABLE `Reactions` ( 691 `UserId` varchar(26) NOT NULL, 692 `PostId` varchar(26) NOT NULL, 693 `EmojiName` varchar(64) NOT NULL, 694 `CreateAt` bigint(20) DEFAULT NULL, 695 PRIMARY KEY (`PostId`,`UserId`,`EmojiName`) 696 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 697 /*!40101 SET character_set_client = @saved_cs_client */; 698 699 -- 700 -- Dumping data for table `Reactions` 701 -- 702 703 LOCK TABLES `Reactions` WRITE; 704 /*!40000 ALTER TABLE `Reactions` DISABLE KEYS */; 705 /*!40000 ALTER TABLE `Reactions` ENABLE KEYS */; 706 UNLOCK TABLES; 707 708 -- 709 -- Table structure for table `Roles` 710 -- 711 712 DROP TABLE IF EXISTS `Roles`; 713 /*!40101 SET @saved_cs_client = @@character_set_client */; 714 /*!40101 SET character_set_client = utf8 */; 715 CREATE TABLE `Roles` ( 716 `Id` varchar(26) NOT NULL, 717 `Name` varchar(64) DEFAULT NULL, 718 `DisplayName` varchar(128) DEFAULT NULL, 719 `Description` text, 720 `CreateAt` bigint(20) DEFAULT NULL, 721 `UpdateAt` bigint(20) DEFAULT NULL, 722 `DeleteAt` bigint(20) DEFAULT NULL, 723 `Permissions` text, 724 `SchemeManaged` tinyint(1) DEFAULT NULL, 725 `BuiltIn` tinyint(1) DEFAULT NULL, 726 PRIMARY KEY (`Id`), 727 UNIQUE KEY `Name` (`Name`) 728 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 729 /*!40101 SET character_set_client = @saved_cs_client */; 730 731 -- 732 -- Dumping data for table `Roles` 733 -- 734 735 LOCK TABLES `Roles` WRITE; 736 /*!40000 ALTER TABLE `Roles` DISABLE KEYS */; 737 INSERT INTO `Roles` VALUES ('1x1ypn6zwbrubc3i7urg1qc4hr','branch_user','authentication.roles.branch_user.name','authentication.roles.branch_user.description',1552023386683,1552023386683,0,' list_branch_classes join_public_classes read_public_class view_branch create_public_class manage_public_class_properties delete_public_class create_private_class manage_private_class_properties delete_private_class invite_user add_user_to_branch',1,1),('9ro6s3aiffbomdsm1dszr1gxec','branch_post_all','authentication.roles.branch_post_all.name','authentication.roles.branch_post_all.description',1552023386717,1552023386717,0,' create_post',0,1),('api7kwbqwjbrtp8b5zq1d5ot8w','system_user_access_token','authentication.roles.system_user_access_token.name','authentication.roles.system_user_access_token.description',1552023386784,1552023386784,0,' create_user_access_token read_user_access_token revoke_user_access_token',0,1),('b5hwuid8ofdb9eoca1skzepmoy','branch_post_all_public','authentication.roles.branch_post_all_public.name','authentication.roles.branch_post_all_public.description',1552023386184,1552023386184,0,' create_post_public',0,1),('j79gy46igfrztkyihuqm38h51y','system_user','authentication.roles.global_user.name','authentication.roles.global_user.description',1552023386370,1552023386918,0,' create_direct_class create_group_class permanent_delete_user create_branch manage_emojis',1,1),('miqk4yzctbyoxg8ye3sbfuoa9y','class_user','authentication.roles.class_user.name','authentication.roles.class_user.description',1552023386587,1552023386587,0,' read_class add_reaction remove_reaction manage_public_class_members upload_file get_public_link create_post use_slash_commands manage_private_class_members delete_post edit_post',1,1),('myf6w6mm5pbabx1dfhxbc9wyyy','system_post_all','authentication.roles.system_post_all.name','authentication.roles.system_post_all.description',1552023386460,1552023386460,0,' create_post',0,1),('nzwf773izfrkirwy47ow3o1xca','system_post_all_public','authentication.roles.system_post_all_public.name','authentication.roles.system_post_all_public.description',1552023386751,1552023386751,0,' create_post_public',0,1),('rhsqatx4yjnk8cwjh785p9tabo','system_admin','authentication.roles.global_admin.name','authentication.roles.global_admin.description',1552023386505,1552023386953,0,' assign_system_admin_role manage_system manage_roles manage_public_class_properties manage_public_class_members manage_private_class_members delete_public_class create_public_class manage_private_class_properties delete_private_class create_private_class manage_system_wide_oauth manage_others_webhooks edit_other_users manage_oauth invite_user delete_post delete_others_posts create_branch add_user_to_branch list_users_without_branch manage_jobs create_post_public create_post_ephemeral create_user_access_token read_user_access_token revoke_user_access_token remove_others_reactions list_branch_classes join_public_classes read_public_class view_branch read_class add_reaction remove_reaction upload_file get_public_link create_post use_slash_commands edit_others_posts remove_user_from_branch manage_branch import_branch manage_branch_roles manage_class_roles manage_slash_commands manage_others_slash_commands manage_webhooks edit_post manage_emojis manage_others_emojis',1,1),('s3uda9wt7p8cinzyyjb418o99h','branch_admin','authentication.roles.branch_admin.name','authentication.roles.branch_admin.description',1552023386281,1552023386281,0,' edit_others_posts remove_user_from_branch manage_branch import_branch manage_branch_roles manage_class_roles manage_others_webhooks manage_slash_commands manage_others_slash_commands manage_webhooks delete_post delete_others_posts',1,1),('uowhz7j9s3gx7r37b1twk87uhy','class_admin','authentication.roles.class_admin.name','authentication.roles.class_admin.description',1552023386649,1552023386649,0,' manage_class_roles',1,1); 738 /*!40000 ALTER TABLE `Roles` ENABLE KEYS */; 739 UNLOCK TABLES; 740 741 -- 742 -- Table structure for table `Schemes` 743 -- 744 745 DROP TABLE IF EXISTS `Schemes`; 746 /*!40101 SET @saved_cs_client = @@character_set_client */; 747 /*!40101 SET character_set_client = utf8 */; 748 CREATE TABLE `Schemes` ( 749 `Id` varchar(26) NOT NULL, 750 `Name` varchar(64) DEFAULT NULL, 751 `DisplayName` varchar(128) DEFAULT NULL, 752 `Description` text, 753 `CreateAt` bigint(20) DEFAULT NULL, 754 `UpdateAt` bigint(20) DEFAULT NULL, 755 `DeleteAt` bigint(20) DEFAULT NULL, 756 `Scope` varchar(32) DEFAULT NULL, 757 `DefaultBranchAdminRole` varchar(64) DEFAULT NULL, 758 `DefaultBranchUserRole` varchar(64) DEFAULT NULL, 759 `DefaultClassAdminRole` varchar(64) DEFAULT NULL, 760 `DefaultClassUserRole` varchar(64) DEFAULT NULL, 761 PRIMARY KEY (`Id`), 762 UNIQUE KEY `Name` (`Name`) 763 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 764 /*!40101 SET character_set_client = @saved_cs_client */; 765 766 -- 767 -- Dumping data for table `Schemes` 768 -- 769 770 LOCK TABLES `Schemes` WRITE; 771 /*!40000 ALTER TABLE `Schemes` DISABLE KEYS */; 772 /*!40000 ALTER TABLE `Schemes` ENABLE KEYS */; 773 UNLOCK TABLES; 774 775 -- 776 -- Table structure for table `Sessions` 777 -- 778 779 DROP TABLE IF EXISTS `Sessions`; 780 /*!40101 SET @saved_cs_client = @@character_set_client */; 781 /*!40101 SET character_set_client = utf8 */; 782 CREATE TABLE `Sessions` ( 783 `Id` varchar(26) NOT NULL, 784 `Token` varchar(26) DEFAULT NULL, 785 `CreateAt` bigint(20) DEFAULT NULL, 786 `ExpiresAt` bigint(20) DEFAULT NULL, 787 `LastActivityAt` bigint(20) DEFAULT NULL, 788 `UserId` varchar(26) DEFAULT NULL, 789 `DeviceId` text, 790 `Roles` varchar(64) DEFAULT NULL, 791 `IsOAuth` tinyint(1) DEFAULT NULL, 792 `Props` text, 793 PRIMARY KEY (`Id`), 794 KEY `idx_sessions_user_id` (`UserId`), 795 KEY `idx_sessions_token` (`Token`), 796 KEY `idx_sessions_expires_at` (`ExpiresAt`), 797 KEY `idx_sessions_create_at` (`CreateAt`), 798 KEY `idx_sessions_last_activity_at` (`LastActivityAt`) 799 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 800 /*!40101 SET character_set_client = @saved_cs_client */; 801 802 -- 803 -- Dumping data for table `Sessions` 804 -- 805 806 LOCK TABLES `Sessions` WRITE; 807 /*!40000 ALTER TABLE `Sessions` DISABLE KEYS */; 808 /*!40000 ALTER TABLE `Sessions` ENABLE KEYS */; 809 UNLOCK TABLES; 810 811 -- 812 -- Table structure for table `Status` 813 -- 814 815 DROP TABLE IF EXISTS `Status`; 816 /*!40101 SET @saved_cs_client = @@character_set_client */; 817 /*!40101 SET character_set_client = utf8 */; 818 CREATE TABLE `Status` ( 819 `UserId` varchar(26) NOT NULL, 820 `Status` varchar(32) DEFAULT NULL, 821 `Manual` tinyint(1) DEFAULT NULL, 822 `LastActivityAt` bigint(20) DEFAULT NULL, 823 PRIMARY KEY (`UserId`), 824 KEY `idx_status_user_id` (`UserId`), 825 KEY `idx_status_status` (`Status`) 826 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 827 /*!40101 SET character_set_client = @saved_cs_client */; 828 829 -- 830 -- Dumping data for table `Status` 831 -- 832 833 LOCK TABLES `Status` WRITE; 834 /*!40000 ALTER TABLE `Status` DISABLE KEYS */; 835 /*!40000 ALTER TABLE `Status` ENABLE KEYS */; 836 UNLOCK TABLES; 837 838 -- 839 -- Table structure for table `Systems` 840 -- 841 842 DROP TABLE IF EXISTS `Systems`; 843 /*!40101 SET @saved_cs_client = @@character_set_client */; 844 /*!40101 SET character_set_client = utf8 */; 845 CREATE TABLE `Systems` ( 846 `Name` varchar(64) NOT NULL, 847 `Value` text, 848 PRIMARY KEY (`Name`) 849 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 850 /*!40101 SET character_set_client = @saved_cs_client */; 851 852 -- 853 -- Dumping data for table `Systems` 854 -- 855 856 LOCK TABLES `Systems` WRITE; 857 /*!40000 ALTER TABLE `Systems` DISABLE KEYS */; 858 INSERT INTO `Systems` VALUES ('AdvancedPermissionsMigrationComplete','true'),('AsymmetricSigningKey','{\"ecdsa_key\":{\"curve\":\"P-256\",\"x\":85473606765277885426098572272657839969684858397331487822403961213130481697183,\"y\":21768024169009006215752583806332445525165014299802801588411746356748078619048,\"d\":77856411969234342853943455407675564464050187128050756722674285242344366590495}}'),('DiagnosticId','8a6b57ugyigti8aqbmzjqixgoe'),('EmojisPermissionsMigrationComplete','true'),('LastSecurityTime','1552023388297'),('Version','5.0.0'); 859 /*!40000 ALTER TABLE `Systems` ENABLE KEYS */; 860 UNLOCK TABLES; 861 862 -- 863 -- Table structure for table `BranchMembers` 864 -- 865 866 DROP TABLE IF EXISTS `BranchMembers`; 867 /*!40101 SET @saved_cs_client = @@character_set_client */; 868 /*!40101 SET character_set_client = utf8 */; 869 CREATE TABLE `BranchMembers` ( 870 `BranchId` varchar(26) NOT NULL, 871 `UserId` varchar(26) NOT NULL, 872 `Roles` varchar(64) DEFAULT NULL, 873 `DeleteAt` bigint(20) DEFAULT NULL, 874 `SchemeUser` tinyint(4) DEFAULT NULL, 875 `SchemeAdmin` tinyint(4) DEFAULT NULL, 876 PRIMARY KEY (`BranchId`,`UserId`), 877 KEY `idx_branchmembers_branch_id` (`BranchId`), 878 KEY `idx_branchmembers_user_id` (`UserId`), 879 KEY `idx_branchmembers_delete_at` (`DeleteAt`) 880 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 881 /*!40101 SET character_set_client = @saved_cs_client */; 882 883 -- 884 -- Dumping data for table `BranchMembers` 885 -- 886 887 LOCK TABLES `BranchMembers` WRITE; 888 /*!40000 ALTER TABLE `BranchMembers` DISABLE KEYS */; 889 /*!40000 ALTER TABLE `BranchMembers` ENABLE KEYS */; 890 UNLOCK TABLES; 891 892 -- 893 -- Table structure for table `Branches` 894 -- 895 896 DROP TABLE IF EXISTS `Branches`; 897 /*!40101 SET @saved_cs_client = @@character_set_client */; 898 /*!40101 SET character_set_client = utf8 */; 899 CREATE TABLE `Branches` ( 900 `Id` varchar(26) NOT NULL, 901 `CreateAt` bigint(20) DEFAULT NULL, 902 `UpdateAt` bigint(20) DEFAULT NULL, 903 `DeleteAt` bigint(20) DEFAULT NULL, 904 `DisplayName` varchar(64) DEFAULT NULL, 905 `Name` varchar(64) DEFAULT NULL, 906 `Description` varchar(255) DEFAULT NULL, 907 `Email` varchar(128) DEFAULT NULL, 908 `Type` varchar(255) DEFAULT NULL, 909 `CompanyName` varchar(64) DEFAULT NULL, 910 `AllowedDomains` text, 911 `InviteId` varchar(32) DEFAULT NULL, 912 `AllowOpenInvite` tinyint(1) DEFAULT NULL, 913 `LastBranchIconUpdate` bigint(20) DEFAULT NULL, 914 `SchemeId` varchar(255) DEFAULT NULL, 915 PRIMARY KEY (`Id`), 916 UNIQUE KEY `Name` (`Name`), 917 KEY `idx_branches_name` (`Name`), 918 KEY `idx_branches_invite_id` (`InviteId`), 919 KEY `idx_branches_update_at` (`UpdateAt`), 920 KEY `idx_branches_create_at` (`CreateAt`), 921 KEY `idx_branches_delete_at` (`DeleteAt`) 922 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 923 /*!40101 SET character_set_client = @saved_cs_client */; 924 925 -- 926 -- Dumping data for table `Branches` 927 -- 928 929 LOCK TABLES `Branches` WRITE; 930 /*!40000 ALTER TABLE `Branches` DISABLE KEYS */; 931 /*!40000 ALTER TABLE `Branches` ENABLE KEYS */; 932 UNLOCK TABLES; 933 934 -- 935 -- Table structure for table `Tokens` 936 -- 937 938 DROP TABLE IF EXISTS `Tokens`; 939 /*!40101 SET @saved_cs_client = @@character_set_client */; 940 /*!40101 SET character_set_client = utf8 */; 941 CREATE TABLE `Tokens` ( 942 `Token` varchar(64) NOT NULL, 943 `CreateAt` bigint(20) DEFAULT NULL, 944 `Type` varchar(64) DEFAULT NULL, 945 `Extra` varchar(128) DEFAULT NULL, 946 PRIMARY KEY (`Token`) 947 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 948 /*!40101 SET character_set_client = @saved_cs_client */; 949 950 -- 951 -- Dumping data for table `Tokens` 952 -- 953 954 LOCK TABLES `Tokens` WRITE; 955 /*!40000 ALTER TABLE `Tokens` DISABLE KEYS */; 956 /*!40000 ALTER TABLE `Tokens` ENABLE KEYS */; 957 UNLOCK TABLES; 958 959 -- 960 -- Table structure for table `UserAccessTokens` 961 -- 962 963 DROP TABLE IF EXISTS `UserAccessTokens`; 964 /*!40101 SET @saved_cs_client = @@character_set_client */; 965 /*!40101 SET character_set_client = utf8 */; 966 CREATE TABLE `UserAccessTokens` ( 967 `Id` varchar(26) NOT NULL, 968 `Token` varchar(26) DEFAULT NULL, 969 `UserId` varchar(26) DEFAULT NULL, 970 `Description` text, 971 `IsActive` tinyint(1) DEFAULT NULL, 972 PRIMARY KEY (`Id`), 973 UNIQUE KEY `Token` (`Token`), 974 KEY `idx_user_access_tokens_token` (`Token`), 975 KEY `idx_user_access_tokens_user_id` (`UserId`) 976 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 977 /*!40101 SET character_set_client = @saved_cs_client */; 978 979 -- 980 -- Dumping data for table `UserAccessTokens` 981 -- 982 983 LOCK TABLES `UserAccessTokens` WRITE; 984 /*!40000 ALTER TABLE `UserAccessTokens` DISABLE KEYS */; 985 /*!40000 ALTER TABLE `UserAccessTokens` ENABLE KEYS */; 986 UNLOCK TABLES; 987 988 -- 989 -- Table structure for table `Users` 990 -- 991 992 DROP TABLE IF EXISTS `Users`; 993 /*!40101 SET @saved_cs_client = @@character_set_client */; 994 /*!40101 SET character_set_client = utf8 */; 995 CREATE TABLE `Users` ( 996 `Id` varchar(26) NOT NULL, 997 `CreateAt` bigint(20) DEFAULT NULL, 998 `UpdateAt` bigint(20) DEFAULT NULL, 999 `DeleteAt` bigint(20) DEFAULT NULL, 1000 `Username` varchar(64) DEFAULT NULL, 1001 `Password` varchar(128) DEFAULT NULL, 1002 `AuthData` varchar(128) DEFAULT NULL, 1003 `AuthService` varchar(32) DEFAULT NULL, 1004 `Email` varchar(128) DEFAULT NULL, 1005 `EmailVerified` tinyint(1) DEFAULT NULL, 1006 `Nickname` varchar(64) DEFAULT NULL, 1007 `FirstName` varchar(64) DEFAULT NULL, 1008 `LastName` varchar(64) DEFAULT NULL, 1009 `Position` varchar(128) DEFAULT NULL, 1010 `Roles` text, 1011 `AllowMarketing` tinyint(1) DEFAULT NULL, 1012 `Props` text, 1013 `NotifyProps` text, 1014 `LastPasswordUpdate` bigint(20) DEFAULT NULL, 1015 `LastPictureUpdate` bigint(20) DEFAULT NULL, 1016 `FailedAttempts` int(11) DEFAULT NULL, 1017 `Locale` varchar(5) DEFAULT NULL, 1018 `Timezone` text, 1019 `MfaActive` tinyint(1) DEFAULT NULL, 1020 `MfaSecret` varchar(128) DEFAULT NULL, 1021 PRIMARY KEY (`Id`), 1022 UNIQUE KEY `Username` (`Username`), 1023 UNIQUE KEY `AuthData` (`AuthData`), 1024 UNIQUE KEY `Email` (`Email`), 1025 KEY `idx_users_email` (`Email`), 1026 KEY `idx_users_update_at` (`UpdateAt`), 1027 KEY `idx_users_create_at` (`CreateAt`), 1028 KEY `idx_users_delete_at` (`DeleteAt`), 1029 FULLTEXT KEY `idx_users_all_txt` (`Username`,`FirstName`,`LastName`,`Nickname`,`Email`), 1030 FULLTEXT KEY `idx_users_all_no_full_name_txt` (`Username`,`Nickname`,`Email`), 1031 FULLTEXT KEY `idx_users_names_txt` (`Username`,`FirstName`,`LastName`,`Nickname`), 1032 FULLTEXT KEY `idx_users_names_no_full_name_txt` (`Username`,`Nickname`) 1033 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 1034 /*!40101 SET character_set_client = @saved_cs_client */; 1035 1036 -- 1037 -- Dumping data for table `Users` 1038 -- 1039 1040 LOCK TABLES `Users` WRITE; 1041 /*!40000 ALTER TABLE `Users` DISABLE KEYS */; 1042 /*!40000 ALTER TABLE `Users` ENABLE KEYS */; 1043 UNLOCK TABLES; 1044 /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; 1045 1046 /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; 1047 /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; 1048 /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; 1049 /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 1050 /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 1051 /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 1052 /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; 1053 1054 -- Dump completed on 2019-03-08 11:06:52