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

fails to clean materialized view that has dependent view on postgres #1129

Closed
teicher opened this issue Nov 12, 2015 · 1 comment
Closed

Comments

@teicher
Copy link

teicher commented Nov 12, 2015

$ psql -d flywaytest
psql (9.3.6)
Type "help" for help.

flywaytest=# CREATE MATERIALIZED VIEW v_dwh_dim_date_mat AS select now();
SELECT 1
flywaytest=# CREATE OR REPLACE VIEW v_dwh_dim_date AS SELECT * from v_dwh_dim_date_mat;
CREATE VIEW
flywaytest=# \q

$ ant -f build-db.xml flywaytest
Buildfile: build-db.xml

flywaytest:
[flyway:clean] Flyway 3.2.1 by Boxfuse
[flyway:clean] Database: jdbc:postgresql://localhost:5432/flywaytest (PostgreSQL 9.3)

BUILD FAILED
build-db.xml:40: Flyway Error: org.flywaydb.core.api.FlywayException: Unable to drop "public"."v_dwh_dim_date_mat"

Total time: 0 seconds

with
    <target name="flywaytest">
        <flyway:clean url="jdbc:postgresql://${database.host}:${database.port}/flywaytest" />
    </target>
@axelfontaine
Copy link
Contributor

I couldn't reproduce the case exactly (your test wasn't failing for me), but I've now added explicit cleaning of materialized views. Please check this now works for you.

axelfontaine pushed a commit to flyway/flywaydb.org that referenced this issue Dec 29, 2015
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