Unable to clean schema that contains a user-defined function with schemabinding in SQL Server #2028
Labels
Milestone
Comments
Thanks for the report. I can confirm that Flyway clean does indeed not handle the case where a function depends on a table. The opposite works though. This is the minimal migration required to demonstrate this: CREATE TABLE [MyTable123] (
[OrderId] [int] NOT NULL,
[MyDate] [date] NOT NULL
)
GO
CREATE FUNCTION [fn_SomeMyTableValue]
(
@OrderId INT
)
RETURNS DATE
WITH SCHEMABINDING
AS
BEGIN
RETURN (
SELECT MyDate
FROM [dbo].[MyTable123]
WHERE OrderId = @OrderId
)
END |
axelfontaine
added a commit
to flyway/flywaydb.org
that referenced
this issue
Jun 5, 2018
dohrayme
pushed a commit
to dohrayme/flyway
that referenced
this issue
Feb 3, 2020
…d function with schemabinding in SQL Server
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Which version and edition of Flyway are you using?
4.2.0
If this is not the latest version, can you reproduce the issue with the latest one as well?
could not test it, since
5.1.0
is not compatible with SQL Server 2012Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)
Maven plugin, Java API
Which database are you using (type & version)?
SQL Server 2012
Which operating system are you using?
Windows 10
What did you do?
SQL Migration:
with the following repeatable
What did you expect to see?
no error
What did you see instead?
Similar to #1193, we get a
after migrating the code and running
The text was updated successfully, but these errors were encountered: