Bug #38154 | Synchronize fails to equate BOOLEAN fields with TINYINT(1) | ||
---|---|---|---|
Submitted: | 15 Jul 2008 22:13 | Modified: | 19 Oct 2009 10:46 |
Reporter: | Ken Ismert | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Workbench | Severity: | S3 (Non-critical) |
Version: | 5.0.23 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | boolean, CHECKED, synchronize, workbench |
[15 Jul 2008 22:13]
Ken Ismert
[3 Aug 2008 15:28]
Sveta Smirnova
Thank you for the report. Verified as described.
[24 Feb 2009 10:58]
Susanne Ebrecht
The problem is too many unknowns. One solution would be that the user will get a question during sync if he wants to have boolean or tinyint.
[14 Oct 2009 14:50]
Daniel Haas
I second this problem. Since Workbench 5.1 SQL-Files created from Workbench that use the BOOLEAN (pseudo-type) already generate code as TINYINT(1). When afterwards making an update to the schema, and taking the last output from Workbench as input to compare, all columns with BOOLEAN want to be changed to TINYINT(1).
[14 Oct 2009 16:30]
Ken Ismert
There are no unknowns. Everything needed to solve the problem is known: 1. BOOLEAN == TINYINT 2. The user chooses the alias BOOLEAN in their schema The fix is display the preferred alias to the user, but regard the underlying types as identical, and do not flag for change. In general, all type aliases should map to their base type, and be regarded as identical for field comparison purposes. You already have this information, as evidenced when you correctly mapped BOOLEAN to TINYINT in the first place. All you have to do is use this same function to map aliases to base types when comparing for field changes.