updating a string colum to xml
steven Evans
Posts: 11 Bronze 2
Hi,
I am looking at changing a column from a string to a type xml type. Some parsing of the string is required to re-encode the data. I have developed a CLR function to do this. My questions is how should I go about doing this I a migration scripted. As I only need the CLR function for the migration do I add and remove it or just leave it.
Any advice would be appreciated
Steven
I am looking at changing a column from a string to a type xml type. Some parsing of the string is required to re-encode the data. I have developed a CLR function to do this. My questions is how should I go about doing this I a migration scripted. As I only need the CLR function for the migration do I add and remove it or just leave it.
Any advice would be appreciated
Steven
Comments
You could then commit your table change but override it with a migration script to execute your CLR function to update the data before changing the column type.
If you're not using migrations, then you'd probably be better off manually running the function to update the data, then getting the column change from source control afterwards?
Redgate Software