优化sql脚本执行顺序
This commit is contained in:
46
doc/sql/createtable/aliyun_certify_postgres.sql
Normal file
46
doc/sql/createtable/aliyun_certify_postgres.sql
Normal file
@@ -0,0 +1,46 @@
|
||||
create table aliyun_certify
|
||||
(
|
||||
id bigint not null primary key,
|
||||
user_id bigint not null,
|
||||
user_phone bigint,
|
||||
name varchar(128) null,
|
||||
id_card varchar(128) null,
|
||||
certify_id varchar(64) null,
|
||||
image text null,
|
||||
message varchar(255) null,
|
||||
is_success integer default 0 not null,
|
||||
is_deleted integer default 0 not null,
|
||||
create_time timestamp not null,
|
||||
create_user int8 null,
|
||||
update_time timestamp null,
|
||||
update_user int8 null,
|
||||
create_dept int8 null,
|
||||
status integer null
|
||||
);
|
||||
|
||||
comment on table aliyun_certify is '阿里云实名记录表';
|
||||
comment on column aliyun_certify.id is 'ID';
|
||||
comment on column aliyun_certify.user_id is '用户ID';
|
||||
comment on column aliyun_certify.user_phone is '用户手机号';
|
||||
comment on column aliyun_certify.name is '实名用户名';
|
||||
comment on column aliyun_certify.id_card is '实名身份证';
|
||||
comment on column aliyun_certify.certify_id is '阿里云实名身份标识';
|
||||
comment on column aliyun_certify.image is '实名照片';
|
||||
comment on column aliyun_certify.message is '阿里云认证消息';
|
||||
comment on column aliyun_certify.is_success is '是否成功';
|
||||
comment on column aliyun_certify.is_deleted is '是否删除';
|
||||
comment on column aliyun_certify.create_time is '创建时间';
|
||||
comment on column aliyun_certify.create_user is '创建人ID';
|
||||
comment on column aliyun_certify.update_time is '修改时间';
|
||||
comment on column aliyun_certify.update_user is '修改人ID';
|
||||
comment on column aliyun_certify.create_dept is '创建部门';
|
||||
comment on column aliyun_certify.status is '状态';
|
||||
|
||||
create index certify_id_index
|
||||
on aliyun_certify (is_deleted, certify_id);
|
||||
|
||||
create index user_certify_id_index
|
||||
on aliyun_certify (is_deleted, user_id, certify_id);
|
||||
|
||||
create index user_id_index
|
||||
on aliyun_certify (is_deleted, user_id, is_success);
|
||||
Reference in New Issue
Block a user