Let me reply.
Thanks for your suggestion. CR 74 039.
Unfortunately, we’re not sure what filter do you mean. The one on page Select Items? When I use this one and get back to change some settings and back again, all the items are newly loaded.
To hide objects that you don’t want to compare, you can use the OTPs on page Select Object Types. It is not possible to hide individual items.
Comparing by schema is planned (CR 69 984). It might help a little.
Unfortunately, we keep failing to simulate it.
If you need to compare just few tables, we recommend you to create a new model with the few tables.
Generally, the comparison is used for bulk create and drop of objects while having references to other objets, such as relationships etc.
This picture shows that there are a lot of options which are not related to compare model do database. Simply items like Project, Author, Version etc doesn’t exists in MySQL database.
You can also see items which has been unchecked on previous picture but are selected here.
- Before Script and After Script - it’s our bug. We’ll fix it. CR 74 040. Name - CR 73 832.
The data type is of type Mediumint(x). In the list in Convertor Mediumint(%p1) is shown, which is our internal name for the type Mediumint(x).
When you insert type Mediumint to your database, type Mediumint(9) (Maximum Display Size is 9) is created in our MySQL db inside the database. So, during RE,
type Mediumint is created back from the type Mediumint(9). If there is another parameter than 9, e.g. 8, we will reverse type Mediumint(8).
If you really inserted Mediumint without a parameter to your database, we don’t know why it was loaded as Mediumint(8). Possibly, your database has a different settings, which has Maximum Display Size 8.
Regarding the default, e.g. MySQL command “SHOW CREATE TABLE tablename” will return default 200 also in quotes. Database doesn’t mind them. However, for customers who do not want quotes for numeric types, there will be a new option to turn it off in future TDM version.
Thanks. CR 74 041.
Yes, it’s an option for easier generation of indexes. In case of further work with Convertor, we recommend not to use this option but to create indexes manually. In any case, we will deal with this issue in the future.
For now you can use the following script - it creates indexes to all foreign keys. On line 5 you can select for which model you want to run the script. On line 15 you can change name of the generated index (IndexName = “IX_”+Relation.Name;).
Run the script in Scripting Window (Tools menu, Expert mode must be on - Settings | Options | General | Expert Mode).
var i, j, Relation, ChildEntity, IndexName, Index, IndexItem, Attribute;
var app = System.GetInterface(“Application”);
var Model = app.Models.GetObject(0);
//The parameter in GetObject determines here with which model the script should work.
//0 is the first model listed in the Application View.
//1 is the second model listed in the Application View, etc.
for(i=0; i<Model.Relations.Count; i++)
Relation = Model.Relations.GetObject( i );
ChildEntity = Relation.ChildEntity;
IndexName = “IX_”+Relation.Name;
if (ChildEntity.Indexes.GetObjectByName(IndexName) == null)
Index = ChildEntity.CreateNewObject( 2012 );
//Create new Index (2012 is object type of PERIndex)
Index.Name = IndexName;
for (j=0; j<Relation.ForeignKeys.Count; j++)
Attribute = Relation.ForeignKeys.GetObject(j).AttrChild;
IndexItem = Index.CreateNewObject( 2013 );
//Create new Item of Index (2013 is object type of PERIndexItem)
IndexItem.Attribute = Attribute;
Log.Information("Index “+IndexName+” created on table "+ChildEntity.Name);
Finally, let us comment on your summary:
Alter script generation is not an easy task but quite complicated (this was one of the reasons why alter scripts were not supported in CS2). Sure, there are cases when it is
better to use a professional software that is specialized directly in database comparison and that works also with data saved in the particular database (however, I’m not thinking of TotalCMD that definitely isn’t able to generate alter script, that doesn’t deal with creation of temporary tables and data transfer etc.).
Also, it depends on what stage your database is - for example it is possible that it’s faster to compare a database with model and generate new DDL script (F9) instead of alter script, and then transfer the data using other tools. TDM is not a product that specializes in alter script generation. Nevertheless, Alter script generation is one of very important features, and we believe, that very helpful in most of cases (not all of them).
In any case, we keep improving the Sync & Convert Wizard and believe that every new TDM version will help developers or DBAs synchronize their databases with their models more easily and comfortably.
On behalf of our TDM dev team I’d like to thank you for your feedback. We appreciate it very much as it helps us make our product better.
P.S. Michal, we’d be happy to discuss some things with you over the phone. Please check out your Private Messages section for our message. Thanks.
Have a nice day.
Vladka + TDM Team