Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQLServerSchema.cleanAssemblies() fails on SQL Server 2005 #1548

Closed
mbutov opened this issue Mar 10, 2017 · 2 comments
Closed

SQLServerSchema.cleanAssemblies() fails on SQL Server 2005 #1548

mbutov opened this issue Mar 10, 2017 · 2 comments

Comments

@mbutov
Copy link

mbutov commented Mar 10, 2017

After upgrading Flyway 3.2.1 -> 4.1.2 calling Schema.clean() fails with error:

    Unable to clean schema [dbo]
    ----------------------------
    SQL State  : 42S22
    Error Code : 207
    Message    : Invalid column name 'is_user_defined'.
    
    java.sql.SQLException: Invalid column name 'is_user_defined'.
        at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:372)
        at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2988)
        at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2421)
        at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:671)
        at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:505)
        at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:1029)
        at org.flywaydb.core.internal.dbsupport.JdbcTemplate.queryForStringList(JdbcTemplate.java:124)
        at org.flywaydb.core.internal.dbsupport.sqlserver.SQLServerSchema.cleanAssemblies(SQLServerSchema.java:418)
        at org.flywaydb.core.internal.dbsupport.sqlserver.SQLServerSchema.doClean(SQLServerSchema.java:211)
        at org.flywaydb.core.internal.dbsupport.Schema.clean(Schema.java:148)

Schema seems to be clean after this.
Expected behavior: schema is clean without error.

Java API Flyway 4.1.2, Ubuntu 14.04, Java 1.8

SQL Server

    > select @@version
    Microsoft SQL Server 2005 - 9.00.5000.00 (Intel X86)
    Dec 10 2010 10:56:29
    Copyright (c) 1988-2005 Microsoft Corporation
    Developer Edition on Windows NT 5.2 (Build 3790: Service Pack 2)
@axelfontaine
Copy link
Contributor

Officially only SQL Server 2008 and later is supported (https://flywaydb.org/documentation/database/sqlserver). However I am not opposed to hide this behind an if statement based on the major version of the database.

@axelfontaine
Copy link
Contributor

We have decided we won't be extending SQL Server support back to SQL Server 2005. Please upgrade to 2008 or later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants