views:

13

answers:

0

Hello all,

Imagine this scenario (in ASP.NET):

You have one page with field1 and your client wants you to move it to another page, since the concept of the term changed. Now, you need to move the field to another table, because it doesn't make sense at old one, but you need the values from that old table as well - to keep the same values.

As a ordinary Developer, I think that your idea would be create the column at new table, send the old values to new table and then remove the old table. After that you would change the layout, removing the field from one page and put it in another page... Right?

Well, no. I need to keep the same layout for records created before this change and the new layout for records that will be created after this. They told me it's because software audit and is house rules. I respect it, so now I need a generic solution for futures changes.

I was thinking to create a table at database with information like:

TableName
FieldName
MinVersion
MaxVersion

And add a column in the "main" table

Version

Then, when something in inserted in the table of version control I (or other developer in my team) would need to change the select and add a column at select statement as bit that will informe the application if the column is to show or not (e.g. ShowField1). In the code, I'll show/hide that Field1 depending on ShowField1.

Have you had some issue like this ever? How did you solve it?

What do you think of my idea?

Regards