We are trying to use Team Coding integrated with TFS (Microsoft Team Foundation Server). We can see that the code in the DB is now stored in TFS, but all of the code contains the “Schema Name” even though the flag to “Add schema name to VCS file” is not checked.
Not sure if we just missing something or if this is a defect in the product…
Thanks,
David
p.s. Here are some screen prints showing what I am talking about:
You can see the schema name of “EAI_UTEST” prepended to all of the package bodies:
The option you are referring to adds the schema to the file name, and does not affect the code within the file itself. Could this possibly be the confusion?
I have confirmed your issue Dave. We will work on getting this fixed.
One work-around would be to check “use sub folders” which will organize your files by object type. The issue doesn’t present itself when this option is used… that is if you don’t mind starting over.
Interesting. I didn’t see this issue when I created a new project with “use sub folders” checked. Maybe there is something more to this. At any rate I can reproduce it so the developer should be able to figure out what is going on here.
This was originally by design. When we rewrote Team Coding, we realized there was too big a risk that the same object name could appear in two or more different schemas. As a result, if you didn’t select that option and checked out a database object, it ran the risk of overwriting the VCS source because there was no schema to distinguish the object as belonging to one schema over another.
I can see the example you provided. Perhaps a compromise would be to only prepend the schema name if you have multiple schemas selected for that Team Project. Since a Team Project can be assigned to only one VCS project, that should help protect the integrity of the VCS source.
I’ll look into seeing what I can do about this, and post a follow-up.
In order to eliminate the confusion and the issue, it seems that I shouldn’t have the option of changing the checkbox “Add schema name to VCS File” unless Subfolders are being used. So it seems like the overall screen layout is off, in that either we have subfolders and an option to remove the schema name, or we don’t have subfolders and so we don’t have choice on the schema name.
From a different perspective, I also understand the heartburn on the duplicated file names, but it almost seems like this should be managed a user issue. The tool should just handle the fact that two objects can exist with the same name and the tool should correctly stop the creation of the Team Coding object saying that it can’t be added because without the schema name, it would cause a duplicate. Then put in a check on enabling and disabling the schema name on the file option such that you can’t disable it without proving there are not any duplicates. Doing it this way gives more choices to the user on how files are to be saved and structured while still protecting the product from causing issues.
Anyways, this give you something to think about while working through the issue.
Thanks (especially on the quick responses!!!),
David
p.s. Today we will removing our Team Coding project and all references to TFS to see if we recreating it like you described will allow us to remove the schema name.
This issue should be fixed for the next beta later this week. I thought about the suggestions you made, and whether or not they could be implemented. Unfortunately, in working through the logistics, I found that they could very easily introduce other issues down the road.
As a result, I’ve fine-tuned the logic behind when a schema name is automatically applied. Team Coding will now only add the schema name under the following circumstances:
The user opts to not use subfolders for a team project, but:
is controlling more than one schema in that project, or
is controlling “All Schemas” in that project
The user chooses the "Object Type / " subfolder structure, but
is controlling more than one schema in the team project to which the object belongs, or
is controlling “All Schemas” in the team project to which the object belongs
These scenarios should safeguard against object DDL incorrectly being overwritten in the VCS. In all other cases, Team Coding should follow the “Add schema name to VCS file” option in the configuration window.
Thanks for bringing this to our attention! Let me know if this works for you, and also let me know if you run into any further issues with it.