Handle system named column default constraints when importing and generating scripts
When maintaining a database, like to assign names to unnamed default constraints. However, generated script only works if the target database has identically named "unamed" default constraints.
To add robustness to the script, I modify these to a short snippet that works on the schema+table+column. (Using a snippet in SQL Prompt to speed the process :)
But why do I need to do this - after all it is replacing machine generated code?
Here is the SQL Prompt snippet I use:
1
vote
![](https://secure.gravatar.com/avatar/65fd12df61cd85e6d2de4e51a9684a1e?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)