schema.sql 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. -- MySQL dump 10.13 Distrib 5.7.19, for osx10.13 (x86_64)
  2. --
  3. -- Host: 127.0.0.1 Database: gotrue_development
  4. -- ------------------------------------------------------
  5. -- Server version 5.7.20
  6. /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  7. /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  8. /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  9. /*!40101 SET NAMES utf8 */;
  10. /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
  11. /*!40103 SET TIME_ZONE='+00:00' */;
  12. /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
  13. /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
  14. /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
  15. /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
  16. --
  17. -- Table structure for table `audit_log_entries`
  18. --
  19. DROP TABLE IF EXISTS `audit_log_entries`;
  20. /*!40101 SET @saved_cs_client = @@character_set_client */;
  21. /*!40101 SET character_set_client = utf8 */;
  22. CREATE TABLE `audit_log_entries` (
  23. `instance_id` varchar(255) DEFAULT NULL,
  24. `id` varchar(255) NOT NULL,
  25. `payload` json DEFAULT NULL,
  26. `created_at` timestamp NULL DEFAULT NULL,
  27. PRIMARY KEY (`id`),
  28. KEY `audit_logs_instance_id_idx` (`instance_id`)
  29. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  30. /*!40101 SET character_set_client = @saved_cs_client */;
  31. --
  32. -- Table structure for table `instances`
  33. --
  34. DROP TABLE IF EXISTS `instances`;
  35. /*!40101 SET @saved_cs_client = @@character_set_client */;
  36. /*!40101 SET character_set_client = utf8 */;
  37. CREATE TABLE `instances` (
  38. `id` varchar(255) NOT NULL,
  39. `uuid` varchar(255) DEFAULT NULL,
  40. `raw_base_config` longtext,
  41. `created_at` timestamp NULL DEFAULT NULL,
  42. `updated_at` timestamp NULL DEFAULT NULL,
  43. PRIMARY KEY (`id`)
  44. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  45. /*!40101 SET character_set_client = @saved_cs_client */;
  46. --
  47. -- Table structure for table `refresh_tokens`
  48. --
  49. DROP TABLE IF EXISTS `refresh_tokens`;
  50. /*!40101 SET @saved_cs_client = @@character_set_client */;
  51. /*!40101 SET character_set_client = utf8 */;
  52. CREATE TABLE `refresh_tokens` (
  53. `instance_id` varchar(255) DEFAULT NULL,
  54. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  55. `token` varchar(255) DEFAULT NULL,
  56. `user_id` varchar(255) DEFAULT NULL,
  57. `revoked` tinyint(1) DEFAULT NULL,
  58. `created_at` timestamp NULL DEFAULT NULL,
  59. `updated_at` timestamp NULL DEFAULT NULL,
  60. PRIMARY KEY (`id`),
  61. KEY `refresh_tokens_instance_id_idx` (`instance_id`),
  62. KEY `refresh_tokens_instance_id_user_id_idx` (`instance_id`,`user_id`),
  63. KEY `refresh_tokens_token_idx` (`token`)
  64. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  65. /*!40101 SET character_set_client = @saved_cs_client */;
  66. --
  67. -- Table structure for table `schema_migration`
  68. --
  69. DROP TABLE IF EXISTS `schema_migration`;
  70. /*!40101 SET @saved_cs_client = @@character_set_client */;
  71. /*!40101 SET character_set_client = utf8 */;
  72. CREATE TABLE `schema_migration` (
  73. `version` varchar(255) NOT NULL,
  74. UNIQUE KEY `version_idx` (`version`)
  75. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  76. /*!40101 SET character_set_client = @saved_cs_client */;
  77. --
  78. -- Table structure for table `users`
  79. --
  80. DROP TABLE IF EXISTS `users`;
  81. /*!40101 SET @saved_cs_client = @@character_set_client */;
  82. /*!40101 SET character_set_client = utf8 */;
  83. CREATE TABLE `users` (
  84. `instance_id` varchar(255) DEFAULT NULL,
  85. `id` varchar(255) NOT NULL,
  86. `aud` varchar(255) DEFAULT NULL,
  87. `role` varchar(255) DEFAULT NULL,
  88. `email` varchar(255) DEFAULT NULL,
  89. `encrypted_password` varchar(255) DEFAULT NULL,
  90. `confirmed_at` timestamp NULL DEFAULT NULL,
  91. `invited_at` timestamp NULL DEFAULT NULL,
  92. `confirmation_token` varchar(255) DEFAULT NULL,
  93. `confirmation_sent_at` timestamp NULL DEFAULT NULL,
  94. `recovery_token` varchar(255) DEFAULT NULL,
  95. `recovery_sent_at` timestamp NULL DEFAULT NULL,
  96. `email_change_token` varchar(255) DEFAULT NULL,
  97. `email_change` varchar(255) DEFAULT NULL,
  98. `email_change_sent_at` timestamp NULL DEFAULT NULL,
  99. `last_sign_in_at` timestamp NULL DEFAULT NULL,
  100. `raw_app_meta_data` json DEFAULT NULL,
  101. `raw_user_meta_data` json DEFAULT NULL,
  102. `is_super_admin` tinyint(1) DEFAULT NULL,
  103. `created_at` timestamp NULL DEFAULT NULL,
  104. `updated_at` timestamp NULL DEFAULT NULL,
  105. PRIMARY KEY (`id`),
  106. KEY `users_instance_id_idx` (`instance_id`),
  107. KEY `users_instance_id_email_idx` (`instance_id`,`email`)
  108. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  109. /*!40101 SET character_set_client = @saved_cs_client */;
  110. /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
  111. /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
  112. /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
  113. /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
  114. /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  115. /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  116. /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
  117. /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
  118. -- Dump completed on 2018-01-19 17:00:48