123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- ALTER TABLE `tmrwatch2`.`feedlaid`
- ADD COLUMN `status` int(1) NOT NULL DEFAULT 0 COMMENT '0 已出库 \r\n1 未出库 \r\n2 已撤销\r\n' AFTER `pricenew`;
- alter table feedtemplet
- add updatetime datetime default CURRENT_TIMESTAMP null;
- ALTER TABLE `tmrwatch`.`tmr`
- ADD COLUMN `lastinorout` int(1) NULL DEFAULT 0 AFTER `autosecondname`
- alter table fpdetail
- alter column ptuse set default 0;
- alter table fpdetail
- alter column ptsuse set default 0;
- alter table fpdetail
- alter column supplement set default 0;
- alter table fpdetail
- alter column ptsrate set default 0;
- alter table fpdetail
- alter column weight set default 0;
- update fpdetail set ptsrate = 0 where ptsrate is null ;
- update fpdetail set supplement = 0 where supplement is null ;
-
- alter table feedp
- alter column supplyweight set default 0;
- -- 修改饲料表顺序
- -- update
- -- (SELECT @rownum:=0)r ,feed fn
- -- set fn.sort = @rownum := @rownum+1
- -- WHERE fn.pastureid = 1647917519
- -- ORDER BY fn.sort DESC
- update
- (SELECT @rownum:=0)r ,bar fn
- set fn.sort = @rownum := @rownum+1
- WHERE fn.pastureid = 1648637190
- ORDER BY fn.id DESC
- -- 宾州筛bug
- -- `barid`, `times`, `operatetime` 唯一索引
- -- 宾州筛历史记录表
- -- CREATE TABLE `pennsieve_history` (
- -- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- -- `barname` varchar(50) DEFAULT NULL COMMENT '栏舍名称',
- -- `times` varchar(50) DEFAULT NULL COMMENT '班次',
- -- `onerate` decimal(20,2) DEFAULT NULL COMMENT '第一层比例',
- -- `oneweight` decimal(20,2) DEFAULT NULL COMMENT '第一层重量',
- -- `tworate` decimal(20,2) DEFAULT NULL COMMENT '第二层比列',
- -- `twoweight` decimal(20,2) DEFAULT NULL COMMENT '第二层重量',
- -- `threerate` decimal(20,2) DEFAULT NULL COMMENT '第三层比列',
- -- `threeweight` decimal(20,2) DEFAULT NULL COMMENT '第三层重量',
- -- `fourrate` decimal(20,2) DEFAULT NULL COMMENT '第四层比列',
- -- `fourweight` decimal(20,2) DEFAULT NULL COMMENT '第四层重量',
- -- `operatetime` datetime DEFAULT NULL COMMENT '操作时间',
- -- `barid` bigint(20) DEFAULT NULL COMMENT '栏舍id',
- -- `pastureid` bigint(20) DEFAULT NULL COMMENT '牧场id',
- -- `species` varchar(50) DEFAULT NULL COMMENT '种类',
- -- PRIMARY KEY (`id`)
- -- ) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8;
- -- 配方干物质
- -- 到体况评分bug
- CREATE TABLE `ftdry_history` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `barname` varchar(50) DEFAULT NULL COMMENT '栏舍名称',
- `times` varchar(50) DEFAULT NULL COMMENT '班次',
- `freshweight` decimal(20,2) DEFAULT NULL COMMENT '新鲜重量',
- `dryweight` decimal(20,2) DEFAULT NULL COMMENT '烘干重量',
- `thoweight` decimal(20,0) DEFAULT NULL COMMENT '理论干物质',
- `actweight` decimal(20,0) DEFAULT NULL COMMENT '实际干物质',
- `barid` bigint(20) DEFAULT NULL COMMENT '栏舍id',
- `changeTime` datetime DEFAULT NULL COMMENT '操作时间',
- `pastureid` bigint(20) DEFAULT NULL COMMENT '牧场id',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB
- CREATE TABLE `dungandbodyhistory` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `barname` varchar(50) DEFAULT NULL COMMENT '栏舍名称',
- `standardscore` varchar(50) DEFAULT NULL COMMENT '标准分数',
- `barid` bigint(20) DEFAULT NULL COMMENT '栏舍id',
- `cowsum` varchar(50) DEFAULT NULL COMMENT '牛头数',
- `onescore` varchar(50) DEFAULT NULL COMMENT '1',
- `twoscore` varchar(50) DEFAULT NULL COMMENT '2',
- `threescore` varchar(50) DEFAULT NULL COMMENT '3',
- `fourscore` varchar(50) DEFAULT NULL COMMENT '4',
- `fivescore` varchar(50) DEFAULT NULL COMMENT '5',
- `pastureid` bigint(20) DEFAULT NULL COMMENT '牧场id',
- `species` varchar(50) DEFAULT NULL COMMENT '种类',
- `changetime` datetime DEFAULT NULL COMMENT '操作时间',
- `sixscore` varchar(50) DEFAULT NULL COMMENT '6',
- `sevenscore` varchar(50) DEFAULT NULL COMMENT '7',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8;
- -- 增加牲畜类别其他
- INSERT INTO `tmrwatch2`.`dictlist`(`pid`, `label`, `value`, `orderby`) VALUES (17, '其他', '6', 6)
- downloadplandtl2 `pastureid`, `pid` 索引
- feedpdate 调整索引顺序 `pastureid`, `date`, `barid`
- feedpdate 索引 pastureid, date, ftid
- fpdetaildate 调整索引顺序 `date`, `barid`, `pastureid`, `times`
- pennsieve,dungsieve,dungscore,bodyscore
- CREATE TABLE `log` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `method` varchar(255) DEFAULT NULL,
- `status` varchar(255) DEFAULT NULL,
- `data` longtext DEFAULT NULL,
- `date` datetime DEFAULT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
|