|
||||
|
|
Bug Reports Forum Have a bug to report? Please post here. |
|
Thread Tools |
11-07-2019, 10:04 PM | #1 |
Minors (Single A)
Join Date: May 2004
Posts: 74
|
Bug in SQL Exports for Trade History
Our league recently just upgraded to OOTP 20 and we noticed that the SQL exports have changed for the trade_history.mysql.sql file. The change was made to incorporate the way draft picks are now handled by adding in the team the draft pick came from. The problem is it looks like the export function was not updated correctly and bad data is getting put into this file.
Examples (my apologies for the ugliness of this) This is an export from OOTP18: ("2026-5-10", "The <Niagara Mariners:team#17> trade 27-year-old starting pitcher <Earl Alison: player#8817>, 26-year-old second baseman <Linus Story: player#8473> and a 6th round draft pick to the <Peterborough Stars:team#27> for 26-year-old starting pitcher <Josh Brann: p...", 31026, 17, 8817, 6, 8473, 0, 0, 0, 0, 0, 0, 0, 0, 27, 7876, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0) Note the 6 and the 5 in the last part, those are the draft picks being traded. This is an export from OOTP20: ("2027-11-4", "The <Niagara Mariners:team#17> trade 27-year-old starting pitcher <Josh Brann: player#7876>, 25-year-old starting pitcher <Garwood Bale: player#10374>, 27-year-old left fielder <Sergeant Chavez: player#7955> and a 15th round draft pick to the <Sault Ste. Mar", 36196, 17, 7876, 17, NULL, 10374, 0, NULL, 7955, 0, NULL, 0, 0, NULL, 0, 0, NULL, 0, 1, 8859, 0, NULL, 0, 0, NULL, 0, 0, NULL, 0, 0, NULL, 0, 0, NULL, 0); Note the 17 and NULL after the 7876, this is the 15th round draft pick that was traded. The team id of the draft pick that was traded was 17 and is being put into the draft_round_0_0 field and not the draft_team_0_0 as it should be. The SQL below shows what fields line up with which fields in the above statements. OOTP18 CREATE SQL Statement CREATE TABLE IF NOT EXISTS `trade_history` (`date` DATE, `summary` VARCHAR(255), `message_id` INT, `team_id_0` INT, `player_id_0_0` INT, `draft_round_0_0` INT, `player_id_0_1` INT, `draft_round_0_1` INT, `player_id_0_2` INT, `draft_round_0_2` INT, `player_id_0_3` INT, `draft_round_0_3` INT, `player_id_0_4` INT, `draft_round_0_4` INT, `cash_0` INT, `team_id_1` INT, `player_id_1_0` INT, `draft_round_1_0` INT, `player_id_1_1` INT, `draft_round_1_1` INT, `player_id_1_2` INT, `draft_round_1_2` INT, `player_id_1_3` INT, `draft_round_1_3` INT, `player_id_1_4` INT, `draft_round_1_4` INT, `cash_1` INT); OOTP20 CREATE SQL Statement CREATE TABLE IF NOT EXISTS `trade_history` (`date` DATE, `summary` VARCHAR(255), `message_id` INT, `team_id_0` INT, `player_id_0_0` INT, `draft_round_0_0` SMALLINT, `draft_team_0_0` INT, `player_id_0_1` INT, `draft_round_0_1` SMALLINT, `draft_team_0_1` INT, `player_id_0_2` INT, `draft_round_0_2` SMALLINT, `draft_team_0_2` INT, `player_id_0_3` INT, `draft_round_0_3` SMALLINT, `draft_team_0_3` INT, `player_id_0_4` INT, `draft_round_0_4` SMALLINT, `draft_team_0_4` INT, `cash_0` INT, `team_id_1` INT, `player_id_1_0` INT, `draft_round_1_0` SMALLINT, `draft_team_1_0` INT, `player_id_1_1` INT, `draft_round_1_1` SMALLINT, `draft_team_1_1` INT, `player_id_1_2` INT, `draft_round_1_2` SMALLINT, `draft_team_1_2` INT, `player_id_1_3` INT, `draft_round_1_3` SMALLINT, `draft_team_1_3` INT, `player_id_1_4` INT, `draft_round_1_4` SMALLINT, `draft_team_1_4` INT, `cash_1` INT); Please look into this bug as it is very annoying to not have the correct draft rounds coming out of the SQL. A couple of our features on our website no longer work as intended due to this. Please let me know if you require any further information. I haven't posted my league files as I don't believe they are necessary, if you look at your SQL export for the trade_history.mysql.sql file you will see that they don't line up properly I am sure of it. Last edited by Subliminal; 11-14-2019 at 12:44 PM. |
11-12-2019, 01:25 PM | #2 |
Minors (Single A)
Join Date: May 2004
Posts: 74
|
Is anyone from OOTP able to confirm this or acknowledge that it is a bug? If you need any more any more information I'll be glad to provide it in order to have this fixed in an update.
Not sure how many people use StatLab but this bug breaks portions of that tool as well (and by breaks I mean that the draft picks don't show up in the trade areas since they're no longer being put in the SQL properly). Any assistance or just an acknowledgement that this is a thing would be great. I understand you're probably very busy and what not and thank you in advance for your help. Last edited by Subliminal; 11-13-2019 at 11:07 AM. |
11-15-2019, 09:34 AM | #3 |
Minors (Single A)
Join Date: May 2004
Posts: 74
|
Hello, anybody home? *tap tap* Is this thing on?
|
11-18-2019, 02:57 AM | #4 |
OOTP Developer
Join Date: Jun 2009
Location: Here and there
Posts: 14,117
|
Sorry about this, yes, I think we can squeeze a fix for this into the upcoming patch.
|
11-18-2019, 08:36 AM | #5 |
Minors (Single A)
Join Date: May 2004
Posts: 74
|
Awesome! Thank you so much for your reply, we certainly appreciate it.
On a side note when importing from 18 to 20 (with a 19 import in between) all data about draft pick rounds disappeared. This isn't so much a concern for me going forward as we've already upgraded but I thought I would mention it. I don't know if it's the import from 18 to 19 that breaks it or the one from 19 to 20, but one of them definitely does delete all the draft pick rounds. Anyway thanks again! Last edited by Subliminal; 11-18-2019 at 08:38 AM. |
11-18-2019, 09:47 PM | #6 |
Minors (Single A)
Join Date: May 2004
Posts: 74
|
OOTP updated today and I just exported the SQL and it's all there. Thanks again Matt we really appreciate this bug fix.
|
Bookmarks |
Thread Tools | |
|
|