20171026211738_create_users.up.sql 1.1 KB

1234567891011121314151617181920212223242526
  1. CREATE TABLE IF NOT EXISTS `{{ index .Options "Namespace" }}users` (
  2. `instance_id` varchar(255) DEFAULT NULL,
  3. `id` varchar(255) NOT NULL,
  4. `aud` varchar(255) DEFAULT NULL,
  5. `role` varchar(255) DEFAULT NULL,
  6. `email` varchar(255) DEFAULT NULL,
  7. `encrypted_password` varchar(255) DEFAULT NULL,
  8. `confirmed_at` timestamp NULL DEFAULT NULL,
  9. `invited_at` timestamp NULL DEFAULT NULL,
  10. `confirmation_token` varchar(255) DEFAULT NULL,
  11. `confirmation_sent_at` timestamp NULL DEFAULT NULL,
  12. `recovery_token` varchar(255) DEFAULT NULL,
  13. `recovery_sent_at` timestamp NULL DEFAULT NULL,
  14. `email_change_token` varchar(255) DEFAULT NULL,
  15. `email_change` varchar(255) DEFAULT NULL,
  16. `email_change_sent_at` timestamp NULL DEFAULT NULL,
  17. `last_sign_in_at` timestamp NULL DEFAULT NULL,
  18. `raw_app_meta_data` text DEFAULT NULL,
  19. `raw_user_meta_data` text DEFAULT NULL,
  20. `is_super_admin` tinyint(1) DEFAULT NULL,
  21. `created_at` timestamp NULL DEFAULT NULL,
  22. `updated_at` timestamp NULL DEFAULT NULL,
  23. PRIMARY KEY (`id`),
  24. KEY `users_instance_id_idx` (`instance_id`),
  25. KEY `users_instance_id_email_idx` (`instance_id`,`email`)
  26. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;