Skip to content

Commit

Permalink
add user table index
Browse files Browse the repository at this point in the history
  • Loading branch information
azpanel committed Mar 15, 2022
1 parent ced3b8c commit 5db24b6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/controller/UserAzureServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ public function save()
);

// 避免 http 429 error
sleep(1);
sleep(2);

// (5/6) 创建网络接口
$text = '在资源组 ' . $vm_resource_group_name . ' 中创建网络接口';
Expand Down
3 changes: 2 additions & 1 deletion database/azure.sql
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ CREATE TABLE `user` (
`personalise` text COLLATE utf8mb4_general_ci COMMENT '用户偏好',
`created_at` int NOT NULL COMMENT '创建时间',
`updated_at` int NOT NULL COMMENT '更新时间',
PRIMARY KEY (`id`)
PRIMARY KEY (`id`),
UNIQUE KEY `email` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `verify`;
Expand Down
2 changes: 1 addition & 1 deletion export-db.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#/bin/bash

mysqldump -d azure --skip-comments | sed 's/AUTO_INCREMENT=[0-9]*\s*//g' > database/azure.sql
mysqldump -d azpanel --skip-comments | sed 's/AUTO_INCREMENT=[0-9]*\s*//g' > database/azure.sql
echo "The database structure file has been exported."

0 comments on commit 5db24b6

Please sign in to comment.