sql server - Rename a column or append a column? that is the question -


I'm going to change many tables in a large system, which probably only understands around 10%.

I want to add three columns. Only one of the existing columns has changed the name of one of them. I want to make a part of me: -

  • Change the column name but are worried about the effect on the unknown parts of the system using the old name.

  • Add three columns to the table so that the old column is redundant (over time).

I think the safest way to do this is to have a Create new table and new stored procedures and methods

P> but it is best to understand whole system ... The big disturbances will be created.

Creating new tables, stored procedures and methods to amend the compositing / existing ones.

EDIT: I've worked on some web applications, who had the same problem. Many developers in front of me have added and modified a bunch of goods in their style. I agree that your case is the same.

Like I said. It is the best way to understand and modify the whole system. But if you can not do it, I prefer to add new modules instead of modifying existing models. When something goes wrong, it is easy to unplug it, at the same time, at least now you know how your module works.

If the current app is very well written and easy to expand, I agree that you will not ask questions here.

Then .. my last thought.

  • Best: Rename the column and modify accordingly (if you know how the system works)
  • Secure: Add new column
  • Secure: Add new table for new columns and create new methods (override or overload)

Comments