Universal Backup Database Enhancements: 2025-10-24

Universal Backup Database Enhancements: 2025-10-24

On 2025-10-24, the Universal Backup Database was Enhanced as Follows:
  1. Removed the Final_Extra_Content and Original_Extra_Content columns.
    1. Information that may have been stored in these columns now resides in the Source_Content columns.
Recent databases can be upgraded to the latest version by running the following script:

  1. DECLARE @SchemaName NVARCHAR(128);
  2. DECLARE @TableName NVARCHAR(128);
  3. DECLARE @ColumnName NVARCHAR(128);
  4. DECLARE @ConstraintName NVARCHAR(128);
  5. DECLARE @SQL NVARCHAR(MAX);

  6. -- Cursor to loop through dbo tables containing either of the two columns
  7. DECLARE DropCursor CURSOR FAST_FORWARD FOR
  8. SELECT 
  9.     s.name AS SchemaName,
  10.     t.name AS TableName,
  11.     c.name AS ColumnName
  12. FROM sys.columns c
  13. JOIN sys.tables t ON c.object_id = t.object_id
  14. JOIN sys.schemas s ON t.schema_id = s.schema_id
  15. WHERE c.name IN ('Original_Extra_Content', 'Final_Extra_Content')
  16.   AND s.name = 'dbo';  -- 🔹 Only dbo schema

  17. OPEN DropCursor;
  18. FETCH NEXT FROM DropCursor INTO @SchemaName, @TableName, @ColumnName;

  19. WHILE @@FETCH_STATUS = 0
  20. BEGIN
  21.     -- Find the default constraint (if any) for that column
  22.     SELECT 
  23.         @ConstraintName = dc.name
  24.     FROM sys.default_constraints dc
  25.     INNER JOIN sys.columns c ON dc.parent_object_id = c.object_id AND dc.parent_column_id = c.column_id
  26.     INNER JOIN sys.tables t ON c.object_id = t.object_id
  27.     INNER JOIN sys.schemas s ON t.schema_id = s.schema_id
  28.     WHERE c.name = @ColumnName
  29.       AND s.name = @SchemaName
  30.       AND t.name = @TableName;

  31.     -- Drop the default constraint if found
  32.     IF @ConstraintName IS NOT NULL
  33.     BEGIN
  34.         SET @SQL = N'ALTER TABLE [' + @SchemaName + '].[' + @TableName + '] DROP CONSTRAINT [' + @ConstraintName + '];';
  35.         PRINT @SQL;
  36.         EXEC sp_executesql @SQL;
  37.         SET @ConstraintName = NULL;
  38.     END

  39.     -- Drop the column itself
  40.     SET @SQL = N'ALTER TABLE [' + @SchemaName + '].[' + @TableName + '] DROP COLUMN [' + @ColumnName + '];';
  41.     PRINT @SQL;
  42.     EXEC sp_executesql @SQL;

  43.     FETCH NEXT FROM DropCursor INTO @SchemaName, @TableName, @ColumnName;
  44. END

  45. CLOSE DropCursor;
  46. DEALLOCATE DropCursor;


    • Related Articles

    • Universal Backup Database Enhancements: 2024-09-02

      On 2024-09-02, the Universal Backup Database was Enhanced as Follows: Added Action_Priority column to all tables Recent databases can be upgraded to the latest version by running the following script: EXEC sp_MSforeachtable ' ALTER TABLE ? ADD ...
    • Universal Backup Database Enhancements: 2024-09-18

      On 2024-09-18, the Universal Backup Database was Enhanced as Follows: Renamed *_Role column on __M_Matters_Participating_Entities to *_Participant_Role Recent databases can be upgraded to the latest version by running the following script: exec ...
    • Universal Backup Database Enhancements: 2024-11-21

      On 2024-11-21, the Universal Backup Database was Enhanced as Follows: Added "Subject" columns to Time, Expenses, and Fees Recent databases can be upgraded to the latest version by running the following script: ALTER TABLE ...
    • Universal Migrator Update: 2025-04-01

      If you have a Universal Backup database from a previous version of Universal Migrator, you will need to upgrade it by following the Delta Migration Procedure. New Backup Tools Universal Migrator now includes Backup options for the following ...
    • Universal Migrator Update: 2025-05-02

      If you have a Universal Backup database from a previous version of Universal Migrator, you will need to upgrade it by following the Delta Migration Procedure. New Backup Tools Universal Migrator now includes Backup options for the following ...