20171026211834_create_refresh_tokens.up.sql 554 B

123456789101112
  1. CREATE TABLE IF NOT EXISTS `{{ index .Options "Namespace" }}refresh_tokens` (
  2. `instance_id` varchar(255) DEFAULT NULL,
  3. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  4. `token` varchar(255) DEFAULT NULL,
  5. `user_id` varchar(255) DEFAULT NULL,
  6. `revoked` tinyint(1) DEFAULT NULL,
  7. `created_at` timestamp NULL DEFAULT NULL,
  8. PRIMARY KEY (`id`),
  9. KEY `refresh_tokens_instance_id_idx` (`instance_id`),
  10. KEY `refresh_tokens_instance_id_user_id_idx` (`instance_id`,`user_id`),
  11. KEY `refresh_tokens_token_idx` (`token`)
  12. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;