Computed Column Dependent on Function Fails in Migration

GHohGHoh Posts: 5 New member
edited March 9, 2021 9:24PM in SQL Source Control
We added a new computed column to a table.  The computed column is dependent on a new function.

When we attempt to deploy this branch, migrations reports the error below.  How can we successfully deploy these needed database changes?
Error: Synchronization of 'Scripts.RedGate' and 'SomeServer.SomeDb' failed:
Cannot find either column "dbo" or the user-defined function or aggregate
"dbo.IsACredit", or the name is ambiguous. Error executing the following SQL:
ALTER TABLE [dbo].[SomeTable] ADD [IsCredit] AS ([dbo].[IsACredit]([ID]))
Thank you in advance!


  • Jessica RJessica R Posts: 1,319 Rose Gold 4
    Hi @GHoh!

    Just to confirm, is the error coming up when doing a get latest? And are you using a migration script?

    Would it be possible for you to share the CREATE statement for the table and function with us?

    Jessica Ramos | Product Support Engineer | Redgate Software

    Have you visited our Help Center?

Sign In or Register to comment.