SmartRename not renaming constraints

DavidAtABCDavidAtABC Posts: 16
edited November 29, 2006 5:40AM in SQL Refactor Previous Versions
Hi,

Recently noticed that contraints - eg DEFAULTs and PRIMARY KEY aren't renamed for a table smart rename (current version of SQL Refactor).

Not a big deal, but maybe worth looking into sometime.

Comments

  • DavidAtABC wrote:
    Hi,

    Recently noticed that contraints - eg DEFAULTs and PRIMARY KEY aren't renamed for a table smart rename (current version of SQL Refactor).

    Not a big deal, but maybe worth looking into sometime.

    Hi,

    could you give an example please? If you have a table and there are defaults on its columns (both directly specified and bound defaults), we handle the table rename correctly, i.e. the defaults will still refer to the relevant columns, and the same insert statements (after modifying the table name) will continue to work, i.e. the default constraints will persist.

    The only other thing I could think of is a situation when the table name is used as a prefix to the default or primary key name. Would you like these prefixes to be changed? It is an idea we did not consider before, but I can see where this can be useful.

    Kind regards,
    Andras
    András Belokosztolszki, PhD
    Red Gate Software Ltd.
  • Hi,

    Yes, it's that last point you made - it the table name as prefix to the constraint name that's not being renamed.

    As I said, it's not a big deal, but you could end up with a name clash if you subsequently created another table with the same name as the pre-renamed table which had a similar constraint.

    Thanks.
  • DavidAtABC wrote:
    Hi,

    Yes, it's that last point you made - it the table name as prefix to the constraint name that's not being renamed.

    As I said, it's not a big deal, but you could end up with a name clash if you subsequently created another table with the same name as the pre-renamed table which had a similar constraint.

    Thanks.

    This is an idea we did not have :), but now we will add it to our feature pot, and will see what we can do with it in future releases.
    Many thanks,

    Andras
    András Belokosztolszki, PhD
    Red Gate Software Ltd.
Sign In or Register to comment.