From 68943e567887460d86221256a98429f20d46e562 Mon Sep 17 00:00:00 2001 From: gongchunyi <deslre0381@gmail.com> Date: 星期五, 15 五月 2026 13:29:52 +0800 Subject: [PATCH] chore: 移除多余sql文件 --- /dev/null | 36 ------------------------------------ 1 files changed, 0 insertions(+), 36 deletions(-) diff --git a/doc/1767778273_add_product_order_id_to_product_work_order.sql b/doc/1767778273_add_product_order_id_to_product_work_order.sql deleted file mode 100644 index 8804120..0000000 --- a/doc/1767778273_add_product_order_id_to_product_work_order.sql +++ /dev/null @@ -1,2 +0,0 @@ -alter table product_work_order - add product_order_id bigint not null default 0 comment '鐢熶骇璁㈠崟id'; diff --git a/doc/20260113-product_model.sql b/doc/20260113-product_model.sql deleted file mode 100644 index dcbb610..0000000 --- a/doc/20260113-product_model.sql +++ /dev/null @@ -1,14 +0,0 @@ -alter table product_model - add product_code varchar(255) null comment '浜у搧缂栫爜'; - -alter table process_route - add process_route_code varchar(255) null comment '宸ヨ壓璺嚎缂栫爜'; - -alter table procurement_record_storage - add product_model_id bigint null comment '浜у搧瑙勬牸id'; -alter table procurement_record_out - add product_model_id bigint null comment '浜у搧瑙勬牸id'; - - -alter table quality_inspect - add product_model_id bigint null comment '浜у搧瑙勬牸id'; diff --git a/doc/20260114_add_dimission_reason_and_remark_to_staff_join_leave_record.sql b/doc/20260114_add_dimission_reason_and_remark_to_staff_join_leave_record.sql deleted file mode 100644 index 4c4acc2..0000000 --- a/doc/20260114_add_dimission_reason_and_remark_to_staff_join_leave_record.sql +++ /dev/null @@ -1,3 +0,0 @@ -alter table staff_join_leave_record - add dimission_reason varchar(255) null comment '绂昏亴鍘熷洜', - add dimission_remark text null comment '绂昏亴澶囨敞'; diff --git a/doc/20260115_add_sys_post_id_to_staff_join_leave_record.sql b/doc/20260115_add_sys_post_id_to_staff_join_leave_record.sql deleted file mode 100644 index 7fea0ad..0000000 --- a/doc/20260115_add_sys_post_id_to_staff_join_leave_record.sql +++ /dev/null @@ -1,6 +0,0 @@ -alter table staff_on_job - add sys_post_id bigint not null default 0 comment '宀椾綅id'; -alter table staff_on_job -drop column post_job; -alter table staff_on_job - add sys_dept_id bigint default 0 not null; \ No newline at end of file diff --git a/doc/20260116_create_table_staff_contract.sql b/doc/20260116_create_table_staff_contract.sql deleted file mode 100644 index f8fc20a..0000000 --- a/doc/20260116_create_table_staff_contract.sql +++ /dev/null @@ -1,13 +0,0 @@ -# 鍛樺伐鍚堝悓琛� -drop table if exists staff_contract; -create table staff_contract -( - id bigint auto_increment primary key, - staff_on_job_id bigint not null default 0 comment '鍛樺伐鍦ㄨ亴id', - contract_start_time datetime null comment '鍚堝悓寮�濮嬫椂闂�', - contract_end_time datetime null comment '鍚堝悓缁撴潫鏃堕棿', - contract_term int not null default 0 comment '鍚堝悓鏈熼檺', - tenant_id bigint not null comment '绉熸埛id', - create_time datetime null comment '褰曞叆鏃堕棿', - update_time datetime null comment '鏇存柊鏃堕棿' -); diff --git a/doc/20260116_create_table_staff_leave.sql b/doc/20260116_create_table_staff_leave.sql deleted file mode 100644 index 7e4b1cf..0000000 --- a/doc/20260116_create_table_staff_leave.sql +++ /dev/null @@ -1,13 +0,0 @@ -#鍛樺伐绂昏亴琛� -drop table if exists staff_join_leave_record; -drop table if exists staff_leave; -create table staff_leave -( - id bigint auto_increment primary key, - staff_on_job_id bigint not null default 0 comment '鍛樺伐鍦ㄨ亴id', - reason varchar(255) null comment '绂昏亴鍘熷洜', - remark text null comment '绂昏亴澶囨敞', - tenant_id bigint not null comment '绉熸埛id', - create_time datetime null comment '褰曞叆鏃堕棿', - update_time datetime null comment '鏇存柊鏃堕棿' -); diff --git a/doc/20260119-procurement_record_storage.sql b/doc/20260119-procurement_record_storage.sql deleted file mode 100644 index 923bbd3..0000000 --- a/doc/20260119-procurement_record_storage.sql +++ /dev/null @@ -1,2 +0,0 @@ -alter table procurement_record_storage - add quality_inspect_id bigint null comment '璐ㄦid'; \ No newline at end of file diff --git a/doc/20260128_add_unique_to_staff_on_job.sql b/doc/20260128_add_unique_to_staff_on_job.sql deleted file mode 100644 index 16b2221..0000000 --- a/doc/20260128_add_unique_to_staff_on_job.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE staff_on_job ADD unique (staff_no); \ No newline at end of file diff --git a/doc/20260209_create_personal_attendance_records.sql b/doc/20260209_create_personal_attendance_records.sql deleted file mode 100644 index 0a25e18..0000000 --- a/doc/20260209_create_personal_attendance_records.sql +++ /dev/null @@ -1,18 +0,0 @@ -#鍛樺伐鑰冨嫟琛� -drop table if exists personal_attendance_records; -create table personal_attendance_records -( - id bigint auto_increment primary key, - staff_on_job_id bigint not null default 0 comment '鍛樺伐鍦ㄨ亴id', - date date not null comment '鏃ユ湡', - work_start_at datetime null comment '宸ヤ綔寮�濮嬫椂闂�', - work_end_at datetime null comment '宸ヤ綔缁撴潫鏃堕棿', - work_hours decimal(5,2) null comment '宸ヤ綔鏃堕暱', - status tinyint not null default 0 comment '鐘舵�� 0姝e父 1杩熷埌 2鏃╅��', - remark text null comment '澶囨敞', - tenant_id bigint not null comment '绉熸埛id', - create_time datetime null comment '褰曞叆鏃堕棿', - update_time datetime null comment '鏇存柊鏃堕棿', - index idx_staff_on_job_id (staff_on_job_id), - unique idx_staff_on_job_id_date (staff_on_job_id, date) -); diff --git a/doc/20260306_create_purchase_return_orders.sql b/doc/20260306_create_purchase_return_orders.sql deleted file mode 100644 index 328cb00..0000000 --- a/doc/20260306_create_purchase_return_orders.sql +++ /dev/null @@ -1,38 +0,0 @@ -#浜у搧閫�璐у崟琛� -drop table if exists purchase_return_orders; -create table purchase_return_orders -( - id bigint auto_increment primary key, - no varchar(255) null comment '閫�璐у崟缂栧彿', - return_type tinyint not null default 0 comment '閫�璐ф柟寮� 0閫�璐ч��娆� 1鎷掓敹', - supplier_id bigint not null default 0 comment '渚涘簲鍟唅d', - project_id bigint not null default 0 comment '椤圭洰id', - project_phase tinyint not null default 0 comment '椤圭洰闃舵', - prepared_at datetime null comment '鍒跺崟鏃ユ湡', - prepared_user_id bigint not null default 0 comment '鍒跺崟浜篿d', - return_user_id bigint not null default 0 comment '閫�鏂欎汉id', - purchase_ledger_id bigint not null default 0 comment '閲囪喘璁㈠崟id', - total_discount_amount decimal(10, 2) null comment '鏁村崟鎶樻墸棰�', - total_discount_rate decimal(10, 2) null comment '鏁村崟鎶樻墸鐜�', - total_amount decimal(10,2) null comment '鎴愪氦閲戦', - remark text null comment '澶囨敞', - create_time datetime null comment '褰曞叆鏃堕棿', - update_time datetime null comment '鏇存柊鏃堕棿', - index idx_supplier_id (supplier_id), - index idx_purchase_ledger_id (purchase_ledger_id), - index idx_project_id (project_id) -); - -#浜у搧閫�璐у崟涓庨噰璐骇鍝佸叧鑱旇〃 -drop table if exists purchase_return_order_products; -create table purchase_return_order_products -( - id bigint auto_increment primary key, - purchase_return_order_id bigint not null default 0 comment '閫�璐у崟id', - sales_ledger_product_id bigint not null default 0 comment '閲囪喘浜у搧id', - return_quantity decimal(16, 4) not null default 0 comment '閫�璐ф暟閲�', - create_time datetime null comment '褰曞叆鏃堕棿', - update_time datetime null comment '鏇存柊鏃堕棿', - index idx_purchase_return_order_id (purchase_return_order_id), - index idx_sales_ledger_product_id (sales_ledger_product_id) -); \ No newline at end of file diff --git a/doc/add.sql b/doc/add.sql deleted file mode 100644 index 8902911..0000000 --- a/doc/add.sql +++ /dev/null @@ -1,132 +0,0 @@ - -# 璁惧鍙拌处 -create table `product-inventory-management`.device_repair -( - id bigint auto_increment - primary key, - device_ledger_id varchar(255) not null comment '璁惧鍙拌处id', - repair_time timestamp null comment '鎶ヤ慨鏃ユ湡', - repair_name varchar(255) not null comment '鎶ヤ慨浜�', - remark varchar(255) not null comment '鏁呴殰鐜拌薄', - maintenance_name varchar not null comment '缁翠慨浜�', - maintenance_time timestamp null comment '缁翠慨鏃堕棿', - maintenance_result varchar(255) null comment '缁翠慨缁撴灉', - status int default 0 comment '鐘舵��', - create_time datetime null comment '褰曞叆鏃堕棿', - update_time datetime null comment '鏇存柊鏃堕棿', - create_user varchar(255) not null comment '褰曞叆浜�', - update_user varchar(255) not null comment '鏇存柊浜�', - tenant_id bigint not null comment '绉熸埛id' -); - -# 璁惧缁翠慨 -create table `product-inventory-management`.device_ledger -( - id bigint auto_increment - primary key, - device_name varchar(255) not null comment '璁惧鍚嶇О', - device_model varchar(255) not null comment '瑙勬牸鍨嬪彿', - supplier_name varchar(255) not null comment '渚涘簲鍟�', - unit varchar(255) not null comment '鍗曚綅', - number decimal not null comment '鏁伴噺', - tax_including_price_unit decimal not null comment '鍚◣鍗曚环', - tax_including_price_total decimal not null comment '鍚◣鎬讳环', - tax_rate decimal not null comment '绋庣巼', - un_tax_including_price_total decimal not null comment '涓嶅惈绋庢�讳环', - create_time timestamp null comment '褰曞叆鏃堕棿', - update_time timestamp null comment '鏇存柊鏃堕棿', - create_user varchar(255) not null comment '褰曞叆浜�', - update_user varchar(255) not null comment '鏇存柊浜�', - tenant_id bigint not null comment '绉熸埛id' -); - -create table `product-inventory-management`.device_maintenance -( - id bigint auto_increment - primary key, - device_ledger_id varchar(255) not null comment '璁惧鍙拌处id', - maintenance__plan_time timestamp null comment '璁″垝淇濆吇鏃ユ湡', - maintenance_actually_name varchar(255) not null comment '瀹為檯淇濆吇浜�', - maintenance_actually_time timestamp null comment '瀹為檯淇濆吇鏃ユ湡', - maintenance_result int not null default 0 comment '淇濆吇缁撴灉 0 缁翠慨 1 瀹屽ソ', - status int not null default 0 comment '鐘舵�� 0 寰呬繚鍏� 1 瀹岀粨', - create_time datetime null comment '褰曞叆鏃堕棿', - update_time datetime null comment '鏇存柊鏃堕棿', - create_user varchar(255) not null comment '褰曞叆浜�', - update_user varchar(255) not null comment '鏇存柊浜�', - tenant_id bigint not null comment '绉熸埛id' -); - - -alter table purchase_ledger - add payment_method varchar(255) null; -alter table sales_ledger - add payment_method varchar(255) null; - - -alter table payment_registration - modify sale_ledger_id bigint default 0 null comment '閿�鍞彴璐d'; - - -alter table ticket_registration - add enter_date timestamp null; - -alter table product_record - add 鍒梍name int null comment 'sale_ledger_projectI_id'; - -# 娣诲姞璁惧鍚嶇О鍜岃鏍煎瀷鍙� -ALTER TABLE `product-inventory-management`.`device_repair` - ADD COLUMN `device_name` varchar(255) NULL AFTER `tenant_id`, - ADD COLUMN `device_model` varchar(255) NULL AFTER `device_name`; - -ALTER TABLE `product-inventory-management`.`device_maintenance` - ADD COLUMN `device_name` varchar(255) NULL AFTER `tenant_id`, - ADD COLUMN `device_model` varchar(255) NULL AFTER `device_name`; - - - -DROP TABLE IF EXISTS storage_attachment; -CREATE TABLE storage_attachment ( - id BIGINT AUTO_INCREMENT PRIMARY KEY, - create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, - update_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, - deleted BIGINT DEFAULT 0 NOT NULL, - record_type SMALLINT DEFAULT 0 NOT NULL, - record_id BIGINT DEFAULT 0 NOT NULL, - name VARCHAR(100) DEFAULT '' NOT NULL, - storage_blob_id BIGINT DEFAULT 0 NOT NULL -) COMMENT='閫氱敤鏂囦欢涓婁紶鐨勯檮浠朵俊鎭�'; - -ALTER TABLE storage_attachment - COMMENT '閫氱敤鏂囦欢涓婁紶鐨勯檮浠朵俊鎭�'; - -ALTER TABLE storage_attachment MODIFY record_type SMALLINT COMMENT '鍏宠仈鐨勮褰曠被鍨�'; -ALTER TABLE storage_attachment MODIFY record_id BIGINT COMMENT '鍏宠仈鐨勮褰昳d'; -ALTER TABLE storage_attachment MODIFY name VARCHAR(100) COMMENT '鍚嶇О, 濡�: file, avatar (鍖哄垎鍚屼竴鏉¤褰曚笉鍚岀被鍨嬬殑闄勪欢)'; -ALTER TABLE storage_attachment MODIFY storage_blob_id BIGINT COMMENT '鍏宠仈storage_blob璁板綍id'; - -CREATE INDEX idx_storage_attachment_on_record - ON storage_attachment (record_type, record_id); - - -CREATE TABLE storage_blob ( - id BIGINT AUTO_INCREMENT PRIMARY KEY, - create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, - key_name VARCHAR(150) DEFAULT '' NOT NULL, - content_type VARCHAR(100) DEFAULT '' NOT NULL, - original_filename VARCHAR(255) DEFAULT '' NOT NULL, - bucket_filename VARCHAR(255) DEFAULT '' NOT NULL, - bucket_name VARCHAR(255) DEFAULT '' NOT NULL, - byte_size BIGINT DEFAULT 0 NOT NULL, - UNIQUE (key_name) -) COMMENT='閫氱敤鏂囦欢涓婁紶鐨勯檮浠朵俊鎭�'; - -ALTER TABLE storage_blob - COMMENT '閫氱敤鏂囦欢涓婁紶鐨勯檮浠朵俊鎭�'; - -ALTER TABLE storage_blob MODIFY key_name VARCHAR(150) COMMENT '璧勬簮id'; -ALTER TABLE storage_blob MODIFY content_type VARCHAR(100) COMMENT '璧勬簮绫诲瀷锛屼緥濡侸PG鍥剧墖鐨勮祫婧愮被鍨嬩负image/jpg'; -ALTER TABLE storage_blob MODIFY original_filename VARCHAR(255) COMMENT '鍘熸枃浠跺悕绉�'; -ALTER TABLE storage_blob MODIFY bucket_filename VARCHAR(255) COMMENT '瀛樺偍妗朵腑鏂囦欢鍚�'; -ALTER TABLE storage_blob MODIFY bucket_name VARCHAR(255) COMMENT '瀛樺偍妗跺悕'; -ALTER TABLE storage_blob MODIFY byte_size BIGINT COMMENT '璧勬簮灏哄(瀛楄妭)'; diff --git a/doc/alter_table_measuring_instrument_ledger.sql b/doc/alter_table_measuring_instrument_ledger.sql deleted file mode 100644 index 2c036fe..0000000 --- a/doc/alter_table_measuring_instrument_ledger.sql +++ /dev/null @@ -1,5 +0,0 @@ -ALTER TABLE measuring_instrument_ledger - ADD COLUMN dept_id BIGINT COMMENT '閮ㄩ棬ID', - ADD COLUMN installation_location VARCHAR(255) COMMENT '瀹夎浣嶇疆', - ADD COLUMN unit VARCHAR(100) COMMENT '妫�瀹氬崟浣�', - ADD COLUMN cycle INT COMMENT '妫�瀹氬懆鏈燂紙澶╋級'; diff --git a/doc/create_table_process_route.sql b/doc/create_table_process_route.sql deleted file mode 100644 index 4a453f8..0000000 --- a/doc/create_table_process_route.sql +++ /dev/null @@ -1,11 +0,0 @@ -# 宸ヨ壓璺嚎 -drop table if exists process_route; -create table process_route -( - id bigint auto_increment primary key, - product_model_id bigint not null default 0 comment '浜у搧id', - description varchar(255) not null default '' comment '鎻忚堪', - tenant_id bigint not null comment '绉熸埛id', - create_time datetime null comment '褰曞叆鏃堕棿', - update_time datetime null comment '鏇存柊鏃堕棿' -); diff --git a/doc/create_table_process_route_item.sql b/doc/create_table_process_route_item.sql deleted file mode 100644 index a1efff9..0000000 --- a/doc/create_table_process_route_item.sql +++ /dev/null @@ -1,62 +0,0 @@ -# 宸ヨ壓璺嚎椤圭洰 -drop table if exists process_route_item; -create table process_route_item -( - id bigint auto_increment primary key, - route_id bigint not null default 0 comment '宸ヨ壓璺嚎id', - product_model_id bigint not null default 0 comment '浜у搧id', - process_id bigint not null default 0 comment '宸ュ簭id', - tenant_id bigint not null comment '绉熸埛id', - create_time datetime null comment '褰曞叆鏃堕棿', - update_time datetime null comment '鏇存柊鏃堕棿' -); - -# 鐢熶骇宸ヨ壓璺嚎椤圭洰 -drop table if exists product_process_route_item; -create table product_process_route_item -( - id bigint auto_increment primary key, - route_id bigint not null default 0 comment '宸ヨ壓璺嚎id', - product_model_id bigint not null default 0 comment '閿�鍞彴璐︿骇鍝乮d', - process_id bigint not null default 0 comment '宸ュ簭id', - tenant_id bigint not null comment '绉熸埛id', - create_time datetime null comment '褰曞叆鏃堕棿', - update_time datetime null comment '鏇存柊鏃堕棿' -); - -# 鐢熶骇璁㈠崟 -drop table if exists product_order; -create table product_order -( - id bigint auto_increment primary key, - sales_ledger_id bigint not null default 0 comment '閿�鍞彴璐d', - product_model_id bigint not null default 0 comment '閿�鍞彴璐︿骇鍝乮d', - route_id bigint not null default 0 comment '宸ヨ壓璺嚎id', - nps_no varchar(255) not null default '' comment '鐢熶骇璁㈠崟鍙�', - status int not null default 0 comment '鐘舵�� 0 寰呯‘璁� 1 宸茬‘璁�', - tenant_id bigint not null comment '绉熸埛id', - create_time datetime null comment '褰曞叆鏃堕棿', - update_time datetime null comment '鏇存柊鏃堕棿' -); -alter table quality_inspect - add purchase_ledger_id int null comment '閲囪喘璁㈠崟id'; - -# 鐢熶骇宸ュ崟 -drop table if exists product_work_order; -create table product_work_order -( - id bigint auto_increment primary key, - product_process_route_item_id bigint not null default 0 comment '宸ヨ壓璺嚎椤圭洰id', - create_time datetime null comment '褰曞叆鏃堕棿', - update_time datetime null comment '鏇存柊鏃堕棿', - work_order_no varchar(255) not null default '' comment '宸ュ崟缂栧彿', - plan_start_time datetime null comment '璁″垝寮�濮嬫椂闂�', - plan_end_time datetime null comment '璁″垝缁撴潫鏃堕棿', - actual_start_time datetime null comment '瀹為檯寮�濮嬫椂闂�', - actual_end_time datetime null comment '瀹為檯缁撴潫鏃堕棿', - status int not null default 0 comment '鐘舵�� 1 寰呯‘璁� 2 寰呯敓浜� 3鐢熶骇涓� 4宸茬敓浜� ', - tenant_id bigint not null comment '绉熸埛id' -); - -alter table product_process - add salary_quota numeric(16,3) null comment '宸ヨ祫瀹氶'; \ No newline at end of file diff --git a/doc/create_table_product_process.sql b/doc/create_table_product_process.sql deleted file mode 100644 index 6242614..0000000 --- a/doc/create_table_product_process.sql +++ /dev/null @@ -1,13 +0,0 @@ -# 宸ュ簭 -drop table if exists product_process; -create table product_process -( - id bigint auto_increment - primary key, - create_time datetime null comment '褰曞叆鏃堕棿', - update_time datetime null comment '鏇存柊鏃堕棿', - name varchar(255) not null default '' comment '宸ヨ壓鍚嶇О', - no varchar(255) not null default '' comment '宸ヨ壓缂栧彿', - remark varchar(255) not null default '' comment '澶囨敞', - tenant_id bigint not null default 0 comment '绉熸埛id' -); \ No newline at end of file diff --git a/doc/create_table_product_structure.sql b/doc/create_table_product_structure.sql deleted file mode 100644 index 83af495..0000000 --- a/doc/create_table_product_structure.sql +++ /dev/null @@ -1,16 +0,0 @@ -# 浜у搧缁撴瀯 -drop table if exists product_structure; -create table product_structure -( - id bigint auto_increment - primary key, - product_model_id bigint not null comment '浜у搧id', - process_id bigint not null comment '宸ュ簭id', - unit_quantity numeric(16, 4) not null comment '鍗曚綅浜у嚭闇�瑕佹暟閲�', - demanded_quantity numeric(16, 4) not null comment '闇�姹傛暟閲�', - unit varchar(255) not null comment '鍗曚綅', - disk_quantity numeric(16, 4) not null comment '鐩樻暟閲�', - tenant_id bigint not null comment '绉熸埛id' -); -alter table product_structure - add parent_id bigint null comment '鐖秈d'; diff --git a/doc/create_table_production_product_main.sql b/doc/create_table_production_product_main.sql deleted file mode 100644 index 18fb92d..0000000 --- a/doc/create_table_production_product_main.sql +++ /dev/null @@ -1,36 +0,0 @@ -drop table if exists production_product_main; -create table production_product_main -( - id bigint auto_increment - primary key, - product_no varchar(255) not null comment '鎶ュ伐鍗曞彿', - user_id bigint not null comment '鎶ュ伐鐢ㄦ埛id', - work_order_id bigint not null comment '宸ュ崟id', - status int not null comment '鐘舵�� 0 寰呮姤宸� 1 寰呯‘璁�', - create_time datetime null comment '褰曞叆鏃堕棿', - tenant_id bigint not null comment '绉熸埛id' -); - -drop table if exists production_product_output; -create table production_product_output -( - id bigint auto_increment - primary key, - product_main_id bigint not null comment '鎶ュ伐鍗昳d', - product_model_id bigint not null comment '浜у搧id', - quantity numeric(16, 4) not null comment '鏁伴噺', - create_time datetime null comment '褰曞叆鏃堕棿', - tenant_id bigint not null comment '绉熸埛id' -); - -drop table if exists production_product_input; -create table production_product_input -( - id bigint auto_increment - primary key, - product_main_id bigint not null comment '鎶ュ伐鍗昳d', - product_model_id bigint not null comment '浜у搧id', - quantity numeric(16, 4) not null comment '鏁伴噺', - create_time datetime null comment '褰曞叆鏃堕棿', - tenant_id bigint not null comment '绉熸埛id' -) -- Gitblit v1.9.3