1.0 KiB
Raw Blame History

ITZX-Clubs-Home-Server

A clubs home for Hangzhou Electron & Information Vocational School building by springboot3.0 with mysql db

Usage

1.Create user table

create table user
(
    id          int comment '用户ID自增',
    name        varchar(20)            not null comment '用户名',
    password    char(40)               not null comment '密码使用SHA1',
    auth        int      default 0     not null comment '用户对应权限组ID',
    avatar      char(40)               null comment '用户头像sha1',
    create_time datetime default now() not null comment '用户创建时间',
    update_time datetime default now() not null on update now() comment '用户数据更新时间'
)
    comment '用户表';

create unique index user_id_index
    on user (id)
    comment '用户表主键';

alter table user
    add constraint user_pk
        primary key (id) comment '用户表主键';

alter table user
    modify id int auto_increment comment '用户ID自增';