How can we help you today? How can we help you today?

Computed Column Dependent on Function Fails in Migration

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!
GHoh
0

Comments

1 comment

  • Jessica R
    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 R
    0

Add comment

Please sign in to leave a comment.