{"action":"created","issue":{"url":"https://api.github.com/repos/flyway/flyway/issues/2051","repository_url":"https://api.github.com/repos/flyway/flyway","labels_url":"https://api.github.com/repos/flyway/flyway/issues/2051/labels{/name}","comments_url":"https://api.github.com/repos/flyway/flyway/issues/2051/comments","events_url":"https://api.github.com/repos/flyway/flyway/issues/2051/events","html_url":"https://github.com/flyway/flyway/issues/2051","id":335366169,"node_id":"MDU6SXNzdWUzMzUzNjYxNjk=","number":2051,"title":"PostgreSQL: clean fails when trying to drop aggregates added by extensions","user":{"login":"CatalinaMoisuc","id":25924333,"node_id":"MDQ6VXNlcjI1OTI0MzMz","avatar_url":"https://avatars0.githubusercontent.com/u/25924333?v=4","gravatar_id":"","url":"https://api.github.com/users/CatalinaMoisuc","html_url":"https://github.com/CatalinaMoisuc","followers_url":"https://api.github.com/users/CatalinaMoisuc/followers","following_url":"https://api.github.com/users/CatalinaMoisuc/following{/other_user}","gists_url":"https://api.github.com/users/CatalinaMoisuc/gists{/gist_id}","starred_url":"https://api.github.com/users/CatalinaMoisuc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CatalinaMoisuc/subscriptions","organizations_url":"https://api.github.com/users/CatalinaMoisuc/orgs","repos_url":"https://api.github.com/users/CatalinaMoisuc/repos","events_url":"https://api.github.com/users/CatalinaMoisuc/events{/privacy}","received_events_url":"https://api.github.com/users/CatalinaMoisuc/received_events","type":"User","site_admin":false},"labels":[{"id":44957965,"node_id":"MDU6TGFiZWw0NDk1Nzk2NQ==","url":"https://api.github.com/repos/flyway/flyway/labels/c:%20clean()","name":"c: clean()","color":"bf6642","default":false},{"id":44944476,"node_id":"MDU6TGFiZWw0NDk0NDQ3Ng==","url":"https://api.github.com/repos/flyway/flyway/labels/d:%20PostgreSQL","name":"d: PostgreSQL","color":"0d7293","default":false},{"id":44944246,"node_id":"MDU6TGFiZWw0NDk0NDI0Ng==","url":"https://api.github.com/repos/flyway/flyway/labels/m:%20Core","name":"m: Core","color":"6634a3","default":false},{"id":760751869,"node_id":"MDU6TGFiZWw3NjA3NTE4Njk=","url":"https://api.github.com/repos/flyway/flyway/labels/r:%20fixed","name":"r: fixed","color":"0e8a16","default":false},{"id":22191326,"node_id":"MDU6TGFiZWwyMjE5MTMyNg==","url":"https://api.github.com/repos/flyway/flyway/labels/t:%20bug","name":"t: bug","color":"fc2929","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/flyway/flyway/milestones/29","html_url":"https://github.com/flyway/flyway/milestone/29","labels_url":"https://api.github.com/repos/flyway/flyway/milestones/29/labels","id":3449909,"node_id":"MDk6TWlsZXN0b25lMzQ0OTkwOQ==","number":29,"title":"Flyway 5.1.4","description":"","creator":{"login":"axelfontaine","id":684824,"node_id":"MDQ6VXNlcjY4NDgyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/684824?v=4","gravatar_id":"","url":"https://api.github.com/users/axelfontaine","html_url":"https://github.com/axelfontaine","followers_url":"https://api.github.com/users/axelfontaine/followers","following_url":"https://api.github.com/users/axelfontaine/following{/other_user}","gists_url":"https://api.github.com/users/axelfontaine/gists{/gist_id}","starred_url":"https://api.github.com/users/axelfontaine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axelfontaine/subscriptions","organizations_url":"https://api.github.com/users/axelfontaine/orgs","repos_url":"https://api.github.com/users/axelfontaine/repos","events_url":"https://api.github.com/users/axelfontaine/events{/privacy}","received_events_url":"https://api.github.com/users/axelfontaine/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":2,"state":"open","created_at":"2018-06-25T14:50:38Z","updated_at":"2018-06-25T17:17:05Z","due_on":"2018-07-03T07:00:00Z","closed_at":null},"comments":1,"created_at":"2018-06-25T11:27:25Z","updated_at":"2018-06-26T05:58:16Z","closed_at":"2018-06-25T17:17:05Z","author_association":"NONE","body":"###### Which version and edition of Flyway are you using?\r\n```\r\n    <dependency>\r\n      <groupId>org.flywaydb</groupId>\r\n      <artifactId>flyway-core</artifactId>\r\n      <version>5.1.3</version>\r\n    </dependency>\r\n```\r\n###### Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)\r\n`Java API`\r\n\r\n###### Which database are you using (type & version)?\r\n`PostgreSQL 9.6`\r\n\r\n###### What did you do?\r\nI added a new migration containing:\r\n```CREATE EXTENSION IF NOT EXISTS CITEXT WITH SCHEMA public;```\r\n\r\nand then another one altering some columns to use `CITEXT` instead of `VARCHAR`.\r\n\r\n\r\n###### What did you expect to see?\r\nI expected `org.flywaydb.core.Flyway.clean()` to know how to clean up the extention.\r\n\r\n\r\n###### What did you see instead?\r\nI got this error:\r\n```\r\nUnable to clean schema \"public\"\r\n-------------------------------\r\nSQL State  : 2BP01\r\nError Code : 0\r\nMessage    : ERROR: cannot drop function min(citext) because extension citext requires it\r\n  Hint: You can drop extension citext instead.\r\n\r\n\tat org.flywaydb.core.internal.database.Schema.clean(Schema.java:151)\r\n\tat org.flywaydb.core.internal.command.DbClean$3.call(DbClean.java:172)\r\n\tat org.flywaydb.core.internal.command.DbClean$3.call(DbClean.java:169)\r\n\tat org.flywaydb.core.internal.util.jdbc.TransactionTemplate.execute(TransactionTemplate.java:74)\r\n\tat org.flywaydb.core.internal.command.DbClean.cleanSchema(DbClean.java:169)\r\n\tat org.flywaydb.core.internal.command.DbClean.clean(DbClean.java:113)\r\n\tat org.flywaydb.core.Flyway.doClean(Flyway.java:1043)\r\n\tat org.flywaydb.core.Flyway.access$300(Flyway.java:78)\r\n\tat org.flywaydb.core.Flyway$3.execute(Flyway.java:1061)\r\n\tat org.flywaydb.core.Flyway$3.execute(Flyway.java:1054)\r\n\tat org.flywaydb.core.Flyway.execute(Flyway.java:1238)\r\n\tat org.flywaydb.core.Flyway.clean(Flyway.java:1054)\r\n\tat ….Migrations.clean(Migrations.java:57)\r\n\tat ….Migrations.execute(Migrations.java:64)\r\n\tat ….Main.main(Main.java:48)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:498)\r\n\tat org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:282)\r\n\tat java.lang.Thread.run(Thread.java:748)\r\nCaused by: org.postgresql.util.PSQLException: ERROR: cannot drop function min(citext) because extension citext requires it\r\n  Hint: You can drop extension citext instead.\r\n\tat org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2433)\r\n\tat org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2178)\r\n\tat org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:306)\r\n\tat org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)\r\n\tat org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)\r\n\tat org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:155)\r\n\tat org.postgresql.jdbc.PgPreparedStatement.execute(PgPreparedStatement.java:144)\r\n\tat org.flywaydb.core.internal.util.jdbc.JdbcTemplate.execute(JdbcTemplate.java:240)\r\n\tat org.flywaydb.core.internal.database.postgresql.PostgreSQLSchema.doClean(PostgreSQLSchema.java:105)\r\n\tat org.flywaydb.core.internal.database.Schema.clean(Schema.java:149)\r\n\t... 20 common frames omitted\r\n```\r\n\r\n**Note**:\r\n\r\nI was waiting since a few months ago for this fix to be released:\r\n[flyway#100](https://github.com/flyway/flyway/issues/100)\r\nIt was released finally in version: `Flyway 5.1.0`, but unfortunately it doesn't work for me."},"comment":{"url":"https://api.github.com/repos/flyway/flyway/issues/comments/400188195","html_url":"https://github.com/flyway/flyway/issues/2051#issuecomment-400188195","issue_url":"https://api.github.com/repos/flyway/flyway/issues/2051","id":400188195,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMDE4ODE5NQ==","user":{"login":"CatalinaMoisuc","id":25924333,"node_id":"MDQ6VXNlcjI1OTI0MzMz","avatar_url":"https://avatars0.githubusercontent.com/u/25924333?v=4","gravatar_id":"","url":"https://api.github.com/users/CatalinaMoisuc","html_url":"https://github.com/CatalinaMoisuc","followers_url":"https://api.github.com/users/CatalinaMoisuc/followers","following_url":"https://api.github.com/users/CatalinaMoisuc/following{/other_user}","gists_url":"https://api.github.com/users/CatalinaMoisuc/gists{/gist_id}","starred_url":"https://api.github.com/users/CatalinaMoisuc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CatalinaMoisuc/subscriptions","organizations_url":"https://api.github.com/users/CatalinaMoisuc/orgs","repos_url":"https://api.github.com/users/CatalinaMoisuc/repos","events_url":"https://api.github.com/users/CatalinaMoisuc/events{/privacy}","received_events_url":"https://api.github.com/users/CatalinaMoisuc/received_events","type":"User","site_admin":false},"created_at":"2018-06-26T05:58:16Z","updated_at":"2018-06-26T05:58:16Z","author_association":"NONE","body":"thank you @axelfontaine. Any idea when 5.1.4 will be released?"}}
{"actor":{"display_login":"CatalinaMoisuc"}}