Smart Rename from columns wrongfuly substitutes name
paulo_morgado
Posts: 97 Silver 2
(SQL Refactor version 1.5.1.61)
I have a set of logging tables in my database that have the same set of columns of the table they are logging changes and some more log related columns. Log tables are populated through instead of insert, delete and update triggers of the logged table.
When I rename one column that's both in the log and logged table, SQL Refactor wrongfuly replaces the name of the column in the deleted and inserted tables.
I have a set of logging tables in my database that have the same set of columns of the table they are logging changes and some more log related columns. Log tables are populated through instead of insert, delete and update triggers of the logged table.
When I rename one column that's both in the log and logged table, SQL Refactor wrongfuly replaces the name of the column in the deleted and inserted tables.
Comments
I'm not completely clear on what is happening. SQL Refactor can only smart-rename one column at a time, so the best assumption that I can make is that you are either smart-renaming a computed column, or the changes necessary to complete the smart rename are unnecessarily rebuilding tables (copying data to a new table, dropping the old one and renaming the temporary table back) and we have a patch that we can give you in case the latter is the problem.
Please let me know.
Just imagine you have this table:
And this one:
With this trigger:
If I use SQL Refactor to rename [Log].[Test].[Test] to [Column], the generated trigger script is this:
Portugal
Web Site
Weblog
Twitter
To summarize, the problem is that the trigger is altered to select [Column] FROM Inserted? Is this supposed to remain as [Test]?
Portugal
Web Site
Weblog
Twitter