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

Flyway does not clean sequences on SQL Server 2012 #806

Closed
jkrizanic opened this issue Jul 23, 2014 · 2 comments
Closed

Flyway does not clean sequences on SQL Server 2012 #806

jkrizanic opened this issue Jul 23, 2014 · 2 comments

Comments

@jkrizanic
Copy link

I am using Flyway through Maven plugin (v3.0) with SQL Server 2012. Maven (3.1.1 and 3.2.1) is executed on Windows 7 x64, and CentOS 6.5 x86_64, with Java 7 Update 51.
Database is SQL Server 2012.

Flyway is executed through Maven with following command:

mvn clean compile flyway:clean flyway:migrate

and I am getting the error that sequences already exist (of course, previously the sequences are created!

A script for creating sequences, which is executed by Flyway is of following format:

CREATE SEQUENCE ${MYAPP}.SEQ_ITEM_ID START WITH 1 INCREMENT BY 1 CACHE 20;
CREATE SEQUENCE ${MYAPP}.SEQ_PFM_USER_ID START WITH 1 INCREMENT BY 1 CACHE 20;
CREATE SEQUENCE ${MYAPP}.SEQ_PFM_ACCOUNT_ID START WITH 1 INCREMENT BY 1 CACHE 20;

Obviously, if sequences exist, on the next execution sequences are not deleted while executing flyway:clean, since I can see my sequences with query:

SELECT *
FROM sys.objects
WHERE type = 'SO';

Can you please check this issue?

@axelfontaine axelfontaine added this to the Flyway 3.1 milestone Jul 23, 2014
@axelfontaine axelfontaine changed the title Flyway run via Maven does not clean sequences on SQL Server 2012 Flyway does not clean sequences on SQL Server 2012 Oct 16, 2014
@axelfontaine
Copy link
Contributor

Thanks for the report. Fixed!

@jkrizanic
Copy link
Author

Thanks, I am gonna try it with 3.1.

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