Bug #50938 | synchronization generates ALTER for identical PK | ||
---|---|---|---|
Submitted: | 5 Feb 2010 8:53 | Modified: | 18 Jun 2010 10:30 |
Reporter: | Andrii Nikitin | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Workbench: Modeling | Severity: | S3 (Non-critical) |
Version: | 5.1.18, 5.2.15 | OS: | Any |
Assigned to: | Sergei Tkachenko | CPU Architecture: | Any |
[5 Feb 2010 8:53]
Andrii Nikitin
[5 Feb 2010 17:30]
Johannes Taxacher
This happens only when model file is created by rev. engineering the script file (not when model is directly rev. engineered from DB) the first issue (alter of the ID column in table a) is caused by the fact that in the script, the PK column in table is specified without the NOT NULL option. MySQL Server though always creates PK fields implicitly as NOT NULL. WB does not mimic server behavior like that because we would have to do so for a large amount of (maybe even engine specific) settings/options - therefore when creating the model from script, the PK column does not match the one in the DB on server. WB outputs the ALTER script to change the column to be NULLable (Server accepts that alter code but silently ignores it). The second problem (recreation of the index in table b) is also only happening when Workbench model is imported from script and synced against DB on server. This needs to be investigated further.
[14 Jun 2010 9:14]
Johannes Taxacher
Bug #54363 has been marked as duplicate of this one
[17 Jun 2010 21:06]
Johannes Taxacher
fix confirmed in repository
[18 Jun 2010 10:30]
Tony Bedford
An entry has been added to the 5.2.24 changelog: Synchronizing a model with a live database generated ALTER statements, even when there appeared to be no difference between the database and the model.