新增省市区信息表

This commit is contained in:
2026-02-05 12:30:16 +08:00
parent 166be502a5
commit a4321e6a1c
6 changed files with 50941 additions and 27 deletions

View File

@@ -60,7 +60,7 @@ comment on column user_genealogy.update_time is '修改时间';
comment on column user_genealogy.status is '状态';
comment on column user_genealogy.is_deleted is '是否已删除';
alter table user_genealogy
owner to postgres;
owner to yicha1lu;
@@ -117,7 +117,7 @@ comment on column user_tree.update_time is '修改时间';
comment on column user_tree.status is '状态';
comment on column user_tree.is_deleted is '是否已删除';
alter table user_tree
owner to postgres;
owner to yicha1lu;
create table user_increase_day
(
@@ -174,7 +174,7 @@ comment on column user_increase_day.update_time is '修改时间';
comment on column user_increase_day.status is '状态';
comment on column user_increase_day.is_deleted is '是否已删除';
alter table user_increase_day
owner to postgres;
owner to yicha1lu;

View File

@@ -47,7 +47,7 @@ comment on column package_info.status is '状态';
comment on column package_info.is_deleted is '是否已删除';
alter table package_info
owner to postgres;
owner to yicha1lu;
create table give_pack_log
(
@@ -95,7 +95,7 @@ comment on column give_pack_log.status is '状态';
comment on column give_pack_log.is_deleted is '是否已删除';
alter table give_pack_log
owner to postgres;
owner to yicha1lu;
create table user_package_info
(
@@ -169,7 +169,7 @@ comment on column user_package_info.status is '状态';
comment on column user_package_info.is_deleted is '是否已删除';
alter table user_package_info
owner to postgres;
owner to yicha1lu;
@@ -290,7 +290,7 @@ comment on column user_benefit.status is '状态';
comment on column user_benefit.is_deleted is '是否已删除';
alter table user_benefit
owner to postgres;
owner to yicha1lu;
create table user_benefit_log
(
@@ -339,4 +339,4 @@ comment on column user_benefit_log.update_time is '修改时间';
comment on column user_benefit_log.status is '状态';
comment on column user_benefit_log.is_deleted is '是否已删除';
alter table user_benefit_log
owner to postgres;
owner to yicha1lu;

View File

@@ -48,10 +48,11 @@ COMMENT ON COLUMN mall_spu.create_time IS '创建时间';
COMMENT ON COLUMN mall_spu.update_user IS '修改人';
COMMENT ON COLUMN mall_spu.update_time IS '修改时间';
COMMENT ON COLUMN mall_spu.is_deleted IS '是否已删除';
alter table mall_spu
owner to yicha1lu;
CREATE TABLE ys_category
CREATE TABLE spu_category
(
id int8 NOT NULL PRIMARY KEY,
cname VARCHAR(100) DEFAULT '' NOT NULL,
@@ -67,22 +68,23 @@ CREATE TABLE ys_category
);
CREATE SEQUENCE ys_category_id_seq START 1;
ALTER TABLE ys_category ALTER COLUMN id SET DEFAULT nextval('ys_category_id_seq');
ALTER TABLE spu_category ALTER COLUMN id SET DEFAULT nextval('ys_category_id_seq');
ALTER SEQUENCE ys_category_id_seq OWNED BY ys_category.id;
COMMENT ON TABLE ys_category IS '商品分类';
COMMENT ON COLUMN ys_category.id IS '主键';
COMMENT ON COLUMN ys_category.cname IS '分类名称';
COMMENT ON COLUMN ys_category.pid IS 'pid';
COMMENT ON COLUMN ys_category.level IS 'level';
COMMENT ON COLUMN ys_category.is_deleted IS '是否已删除';
COMMENT ON COLUMN ys_category.create_time IS '创建时间';
COMMENT ON COLUMN ys_category.create_user IS '创建人';
COMMENT ON COLUMN ys_category.update_time IS '修改时间';
COMMENT ON COLUMN ys_category.update_user IS '修改人';
COMMENT ON COLUMN ys_category.status IS '状态';
COMMENT ON COLUMN ys_category.create_dept IS '创建部门';
COMMENT ON TABLE spu_category IS '商品分类';
COMMENT ON COLUMN spu_category.id IS '主键';
COMMENT ON COLUMN spu_category.cname IS '分类名称';
COMMENT ON COLUMN spu_category.pid IS 'pid';
COMMENT ON COLUMN spu_category.level IS 'level';
COMMENT ON COLUMN spu_category.is_deleted IS '是否已删除';
COMMENT ON COLUMN spu_category.create_time IS '创建时间';
COMMENT ON COLUMN spu_category.create_user IS '创建人';
COMMENT ON COLUMN spu_category.update_time IS '修改时间';
COMMENT ON COLUMN spu_category.update_user IS '修改人';
COMMENT ON COLUMN spu_category.status IS '状态';
COMMENT ON COLUMN spu_category.create_dept IS '创建部门';
alter table spu_category
owner to yicha1lu;
CREATE TABLE mall_cart
(
@@ -122,7 +124,8 @@ COMMENT ON COLUMN mall_cart.status IS '状态';
COMMENT ON COLUMN mall_cart.is_deleted IS '是否已删除';
CREATE INDEX idx_user_id ON mall_cart (user_id);
alter table mall_cart
owner to yicha1lu;
CREATE TABLE user_address
(
@@ -166,3 +169,6 @@ COMMENT ON COLUMN user_address.update_user IS '修改人';
COMMENT ON COLUMN user_address.update_time IS '修改时间';
COMMENT ON COLUMN user_address.status IS '状态';
COMMENT ON COLUMN user_address.is_deleted IS '是否已删除';
alter table user_address
owner to yicha1lu;

View File

@@ -52,7 +52,8 @@ COMMENT ON COLUMN user_order.update_time IS '修改时间';
COMMENT ON COLUMN user_order.status IS '状态';
CREATE INDEX user_order_index ON user_order (user_id, order_type);
alter table user_order
owner to yicha1lu;
CREATE TABLE mall_summary_order
@@ -134,6 +135,8 @@ CREATE INDEX mso_status_index ON mall_summary_order (payment_status, status);
CREATE INDEX mso_recorded_index ON mall_summary_order (payment_status, is_recorded);
CREATE INDEX mso_statistics_index ON mall_summary_order (payment_status, is_statistics);
alter table mall_summary_order
owner to yicha1lu;
CREATE TABLE mall_detail_order
@@ -193,6 +196,9 @@ COMMENT ON COLUMN mall_detail_order.is_deleted IS '是否已删除';
CREATE INDEX mdo_index ON mall_detail_order (summary_order_id);
CREATE INDEX mdo_uid_index ON mall_detail_order (user_id);
alter table mall_detail_order
owner to yicha1lu;
CREATE TABLE mall_summary_order_after
(
@@ -253,4 +259,6 @@ COMMENT ON COLUMN mall_summary_order_after.status IS '状态';
COMMENT ON COLUMN mall_summary_order_after.is_deleted IS '是否已删除';
COMMENT ON COLUMN mall_summary_order_after.after_info IS '售后详情';
;
alter table mall_summary_order_after
owner to yicha1lu;

View File

@@ -0,0 +1,50 @@
CREATE TABLE regions_info
(
id int4 PRIMARY KEY,
name VARCHAR(50) NULL,
level int4 NULL,
pid int4 DEFAULT 0 NULL,
lon DECIMAL(10, 6) NULL,
lat DECIMAL(10, 6) NULL,
region_code VARCHAR(128) NULL,
full_name VARCHAR(200) NULL,
vendor_region_id int8 NULL,
store_city_id int8 NULL,
hotel_city_code VARCHAR(128) NULL,
hotel_city_pinyin VARCHAR(128) NULL,
hotel_city_initials VARCHAR(4) NULL,
sight_city_name VARCHAR(32) NULL,
is_deleted int4 DEFAULT 0 NULL,
create_time TIMESTAMP(6) NULL,
create_user int8 NULL,
update_time TIMESTAMP(6) NULL,
update_user int8 NULL,
status int4 NULL,
create_dept int8 NULL
);
COMMENT ON TABLE regions_info IS '地区详情表';
COMMENT ON COLUMN regions_info.id IS '主键';
COMMENT ON COLUMN regions_info.name IS '名称';
COMMENT ON COLUMN regions_info.level IS '层级';
COMMENT ON COLUMN regions_info.pid IS '父主键';
COMMENT ON COLUMN regions_info.lon IS '经度';
COMMENT ON COLUMN regions_info.lat IS '纬度';
COMMENT ON COLUMN regions_info.region_code IS '地区编码';
COMMENT ON COLUMN regions_info.full_name IS '全称';
COMMENT ON COLUMN regions_info.vendor_region_id IS '服务商地区表id';
COMMENT ON COLUMN regions_info.store_city_id IS '城市店铺id';
COMMENT ON COLUMN regions_info.hotel_city_code IS '酒店地区编码';
COMMENT ON COLUMN regions_info.hotel_city_pinyin IS '酒店地区拼音';
COMMENT ON COLUMN regions_info.hotel_city_initials IS '酒店地区拼音首字母';
COMMENT ON COLUMN regions_info.sight_city_name IS '景点城市名';
COMMENT ON COLUMN regions_info.is_deleted IS '是否删除';
COMMENT ON COLUMN regions_info.create_user IS '创建人';
COMMENT ON COLUMN regions_info.create_dept IS '创建部门';
COMMENT ON COLUMN regions_info.create_time IS '创建时间';
COMMENT ON COLUMN regions_info.update_user IS '修改人';
COMMENT ON COLUMN regions_info.update_time IS '修改时间';
COMMENT ON COLUMN regions_info.status IS '状态';
alter table regions_info
owner to yicha1lu;

File diff suppressed because it is too large Load Diff