Saturday, 24 August 2013

Schema Change Script : Validation and test cases

Schema Change Script : Validation and test cases

I have written a schema change script to remove a certain column C from
Table A to Table B. This is my logic/algorithm,
If Column C does not exist already in Table B, add it.
If column C exists in Table B, update the newly added Column values(which
would initially be null) to the corresponding matching values from Table A
on a condition A.columnZ(Primary_Key) = B.ColumnZ(Foreign_key).
Drop Column C from Table A.
I have written the script for the same( a simple one, though). Now, since
Database changes are highly critical because its going to be run on
Production database and the column contains some values related to Users'
billing information, I want to test them completely before going for
deployment.
I would like to get suggestions for Test-cases to validate the
script.Since, this is the first time we're going to making this scripts,
any other advice on potential problems while making change scripts, would
be appreciated as well.

No comments:

Post a Comment