Browse Source

update sql

oubo 5 years ago
parent
commit
c5c91b2976
2 changed files with 8 additions and 0 deletions
  1. 2 0
      data/sql/structure.sql
  2. 6 0
      data/upgrade/v3.0.0/v3.0.0.sql

+ 2 - 0
data/sql/structure.sql

@@ -1578,6 +1578,7 @@ CREATE TABLE `t_process_in_calculation`  (
   `actual_in_storehouse_quantity` decimal(22, 2) NOT NULL,
   `call_time` datetime(0) NOT NULL,
   `tag_numbers`  tinyint(1) NULL DEFAULT 0,
+  `user_id`  int(11) NOT NULL,
   PRIMARY KEY (`calculation_id`, `data_id`) USING BTREE,
   INDEX `call_time`(`call_time`) USING BTREE,
   INDEX `data_id`(`data_id`) USING BTREE,
@@ -1603,6 +1604,7 @@ CREATE TABLE `t_process_out_calculation`  (
   `call_time` datetime(0) NOT NULL,
   `clearing_storehouse` int(1) NOT NULL DEFAULT 0,
   `tag_numbers`  tinyint(1) NULL DEFAULT 0,
+  `user_id`  int(11) NOT NULL,
   PRIMARY KEY (`calculation_id`, `data_id`, `from_data_id`) USING BTREE,
   INDEX `call_time`(`call_time`) USING BTREE,
   INDEX `affair_id`(`affair_id`, `calculation_time`, `calculation_condition`, `tagIds`, `from_data_id`) USING BTREE

+ 6 - 0
data/upgrade/v3.0.0/v3.0.0.sql

@@ -148,6 +148,12 @@ ADD COLUMN IF NOT EXISTS `calculation_ctime`  datetime NULL DEFAULT NULL AFTER `
 ALTER TABLE `t_inventory`
 ADD COLUMN IF NOT EXISTS `inventory_price_unit`  tinyint(1) NULL AFTER `utime`;
 
+ALTER TABLE `t_process_in_calculation`
+ADD COLUMN IF NOT EXISTS `user_id`  int(11) NOT NULL AFTER `tag_numbers`;
+
+ALTER TABLE `t_process_out_calculation`
+ADD COLUMN IF NOT EXISTS `user_id`  int(11) NOT NULL AFTER `tag_numbers`;
+
 ALTER TABLE `t_statement_calculation`
 ADD COLUMN IF NOT EXISTS `bill_ids` text NULL AFTER `tag_numbers`;