common_user_address 建表语句
This commit is contained in:
45
doc/sql/pending/20260214_increase.sql
Normal file
45
doc/sql/pending/20260214_increase.sql
Normal file
@@ -0,0 +1,45 @@
|
||||
DROP TABLE IF EXISTS common_user_address;
|
||||
CREATE TABLE common_user_address
|
||||
(
|
||||
id int8 NOT NULL PRIMARY KEY,
|
||||
user_id int8 NOT NULL,
|
||||
regions_id int8 NOT NULL,
|
||||
province VARCHAR(200) NULL,
|
||||
city VARCHAR(200) NULL,
|
||||
district VARCHAR(200) NULL,
|
||||
street VARCHAR(200) NULL,
|
||||
detail VARCHAR(500) NULL,
|
||||
consignee VARCHAR(200) NOT NULL,
|
||||
phone VARCHAR(20) NOT NULL,
|
||||
is_default int4 NULL,
|
||||
create_user int8 NULL,
|
||||
create_dept int8 NULL,
|
||||
create_time TIMESTAMP NULL,
|
||||
update_user int8 NULL,
|
||||
update_time TIMESTAMP NULL,
|
||||
status int4 NULL,
|
||||
is_deleted int4 DEFAULT 0 NULL
|
||||
);
|
||||
|
||||
COMMENT ON TABLE common_user_address IS '用户地址表';
|
||||
COMMENT ON COLUMN common_user_address.id IS '主键';
|
||||
COMMENT ON COLUMN common_user_address.user_id IS '用户id';
|
||||
COMMENT ON COLUMN common_user_address.regions_id IS '地区信息id';
|
||||
COMMENT ON COLUMN common_user_address.province IS '省份';
|
||||
COMMENT ON COLUMN common_user_address.city IS '城市';
|
||||
COMMENT ON COLUMN common_user_address.district IS '区县';
|
||||
COMMENT ON COLUMN common_user_address.street IS '街道';
|
||||
COMMENT ON COLUMN common_user_address.detail IS '详细地址';
|
||||
COMMENT ON COLUMN common_user_address.consignee IS '收货人';
|
||||
COMMENT ON COLUMN common_user_address.phone IS '联系电话';
|
||||
COMMENT ON COLUMN common_user_address.is_default IS '是否默认地址(0=否,1=是)';
|
||||
COMMENT ON COLUMN common_user_address.create_user IS '创建人';
|
||||
COMMENT ON COLUMN common_user_address.create_dept IS '创建部门';
|
||||
COMMENT ON COLUMN common_user_address.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN common_user_address.update_user IS '修改人';
|
||||
COMMENT ON COLUMN common_user_address.update_time IS '修改时间';
|
||||
COMMENT ON COLUMN common_user_address.status IS '状态';
|
||||
COMMENT ON COLUMN common_user_address.is_deleted IS '是否已删除';
|
||||
|
||||
CREATE INDEX idx_user_address_user_id ON common_user_address (user_id);
|
||||
CREATE INDEX idx_user_address_regions_id ON common_user_address (regions_id);
|
||||
Reference in New Issue
Block a user