-
-
Notifications
You must be signed in to change notification settings - Fork 812
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
df5c220
commit 0514bd5
Showing
4 changed files
with
82 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
-- NOT NULL 不能为空 | ||
-- unsigned 是指数值类型只能为正数。 | ||
-- DEFAULT 默认值 | ||
|
||
CREATE TABLE `user_accounts` ( | ||
`id` int(100) unsigned NOT NULL AUTO_INCREMENT, | ||
`name` varchar(32) NOT NULL DEFAULT '' COMMENT '姓名', | ||
`sex` tinyint(32) NOT NULL DEFAULT 0 COMMENT '性别:0,保密;1,男;2,女', | ||
`mobile` varchar(20) NOT NULL DEFAULT '' COMMENT '手机', | ||
`create_at` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), | ||
`update_at` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), | ||
-- 创建唯一索引,不允许重复 | ||
UNIQUE INDEX idx_user_mobile(`mobile`), | ||
PRIMARY KEY (`id`) | ||
) | ||
ENGINE=InnoDB DEFAULT CHARSET=utf8 | ||
COMMENT='用户表信息'; |