This commit is contained in:
2024-03-13 00:33:46 +01:00
commit e124a47765
19374 changed files with 9806149 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
--Migration
DECLARE @sql nvarchar(max) = N''
SELECT @sql = 'ALTER TABLE [dbo].[T_FOGLALKOZAS] DROP CONSTRAINT [' + d.name + '];'
FROM sys.default_constraints d
INNER JOIN sys.all_columns c ON c.column_id = d.parent_column_id AND d.parent_object_id = c.object_id
WHERE d.parent_object_id = OBJECT_ID('T_FOGLALKOZAS')
AND c.name = 'C_TULORASZAM'
EXEC sp_executesql @sql
GO
ALTER TABLE [dbo].[T_FOGLALKOZAS] ALTER COLUMN [C_TULORASZAM] NUMERIC (10, 2) NOT NULL;
GO
ALTER TABLE [dbo].[T_FOGLALKOZAS] ADD DEFAULT ((0)) FOR [C_TULORASZAM];
GO
DECLARE @sql nvarchar(max) = N''
SELECT @sql += 'EXEC sp_refreshview ''[' + SCHEMA_NAME(schema_id) + '].[' + name + ']'';'
FROM sys.views v
WHERE v.name IN ('T_FOGLALKOZAS', 'T_FOGLALKOZAS_OSSZES')
EXEC sp_executesql @sql
GO