I am about to alter the several tables in a massive system which I probably only understand around 10%.
I want to add three columns. One of these is just a rename of an existing column. Part of me wants to :-
-
Rename the column but worried about the impact on unknown parts of the system that use the old name.
-
Append the three columns to the table therefore making the old column redundant (over time).
I think the safest way to do this is to create a new table and create new stored procedures and methods.
But it is best to understand the whole system though… Putting on bandages like this will become a big mess over time.
Creating new tables, stored procedures and methods is a cleaner mess than adding/modifying stuff to existing.
EDIT: I have worked on a few web apps that had the same problem. Multiple developers before me added and modified a bunch of stuff in their own style. I assume your case is similar.
Like I said. Best way is to understand the whole system and modify it. But if you can’t, I find it better to add new modules rather than modify existing. It is easy to unplug it when something goes wrong. Also, at least now you know exactly how your module works.
If the existing app is very well written and easy to extend, I assume you wouldn’t ask the question here.
So.. my final thoughts.