Update docs/hooks.txt for ShowSearchHitTitle
[mediawiki.git] / maintenance / mssql / archives / patch-drop-ss_total_views.sql
blob7525ed579abaddc2a1f88a0b8b92f459b3b69a0f
1 DECLARE @sql nvarchar(max),
2         @id sysname;--
4 SET @sql = 'ALTER TABLE /*_*/site_stats DROP CONSTRAINT ';--
6 SELECT @id = df.name
7 FROM sys.default_constraints df
8 JOIN sys.columns c
9         ON c.object_id = df.parent_object_id
10         AND c.column_id = df.parent_column_id
11 WHERE
12         df.parent_object_id = OBJECT_ID('/*_*/site_stats')
13         AND c.name = 'ss_total_views';--
15 SET @sql = @sql + @id;--
17 EXEC sp_executesql @sql;--
19 ALTER TABLE /*_*/site_stats DROP COLUMN ss_total_views;