This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('app', []).directive('ngDebounce', function($timeout) { | |
return { | |
restrict: 'A', | |
require: 'ngModel', | |
priority: 99, | |
link: function(scope, elm, attr, ngModelCtrl) { | |
if (attr.type === 'radio' || attr.type === 'checkbox') return; | |
elm.unbind('input'); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE @sql NVARCHAR(MAX) | |
WHILE 1=1 | |
BEGIN | |
SELECT TOP 1 @sql = N'alter table TABLE_NAME drop constraint ['+dc.NAME+N']' | |
from sys.default_constraints dc | |
JOIN sys.columns c | |
ON c.default_object_id = dc.object_id | |
WHERE | |
dc.parent_object_id = OBJECT_ID('TABLE_NAME') | |
AND c.name = N'COLUMN_NAME' |