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

CockroachDB 2.0 support #1970

Closed
01e9 opened this issue Apr 4, 2018 · 13 comments
Closed

CockroachDB 2.0 support #1970

01e9 opened this issue Apr 4, 2018 · 13 comments

Comments

@01e9
Copy link

@01e9 01e9 commented Apr 4, 2018

https://github.com/cockroachdb/cockroach/releases

I tried to execute flyway clean and flyway baseline but I kept getting errors about scheme. All attempts to fix it by changing config parameters have failed.

I just want to know if it's officially supported.

@axelfontaine axelfontaine added this to the Someday-Maybe milestone Apr 4, 2018
@axelfontaine
Copy link
Contributor

@axelfontaine axelfontaine commented Apr 4, 2018

As stated in the docs, current support is for 1.1 only.

@axelfontaine axelfontaine changed the title cockroach 2.0 CockroachDB 2.0 support Apr 4, 2018
@axelfontaine axelfontaine modified the milestones: Someday-Maybe, Flyway 5.1.0 Apr 4, 2018
@cristhiank
Copy link

@cristhiank cristhiank commented Apr 5, 2018

I'm having the same issues with the 2.0 version.
I found out that Flyway is looking for existent schemas in the pg_namespace table as seen in the following line.

return jdbcTemplate.queryForInt("SELECT COUNT(*) FROM pg_namespace WHERE nspname=?", name) > 0;

But it seems that CockroachDB 2.0 doesn't create a record for the user databases in the pg_namespace table.

This can be fixed if we use pg_database instead of pg_namespace.

@cristhiank
Copy link

@cristhiank cristhiank commented Apr 5, 2018

I was digging into the CockroachDB and it seems that they do not support "custom" schemas inside the databases, the 'public' schema is always fixed to the user objects.
I'm working in a pull-request, I will let you know and reference this issue when it's ready.

@01e9
Copy link
Author

@01e9 01e9 commented Apr 5, 2018

I don't need custom schemas. Making flyway work only with public schema with Cockroach will be an acceptable solution.

@cristhiank
Copy link

@cristhiank cristhiank commented Apr 5, 2018

Hello @axelfontaine ,

Is there any "CI" builds we can use as a temporary solution while the next release is out?
I'm really looking forward to the revision of this issue. Thanks!

@nstewart
Copy link

@nstewart nstewart commented Apr 5, 2018

This should be resolved in Flyway 5.1 cc @axelfontaine

@cristhiank
Copy link

@cristhiank cristhiank commented Apr 5, 2018

Thanks @nstewart , As you are part of the CockroachDB team, I would like to ask you if is it true what I said about the 'public' schema in this comment.

@axelfontaine
Copy link
Contributor

@axelfontaine axelfontaine commented Apr 6, 2018

@cristhiank We expect this to land on master early next week. From then on you will be able to build Flyway from source to use it until the official 5.1 release.

axelfontaine added a commit to flyway/flywaydb.org that referenced this issue Apr 9, 2018
@axelfontaine
Copy link
Contributor

@axelfontaine axelfontaine commented Apr 9, 2018

We have just pushed support for CockroachDB 2.0. The current master now supports both CockroachDB 1.1 and 2.0. There are no known issues. You can access it by building from source until the official 5.1 release.

@tirasmuturi
Copy link

@tirasmuturi tirasmuturi commented May 14, 2018

@axelfontaine could you tell us when flyway version 5.1 will be released.

@01e9
Copy link
Author

@01e9 01e9 commented May 14, 2018

I'm also waiting 5.1 because I don't know how to compile it and don't want to waste time learning it.

@cmakamara
Copy link

@cmakamara cmakamara commented May 17, 2018

You can use this temporarily, basically pulls from the master branch https://plugins.gradle.org/plugin/com.radioafricagroup.plugins.flyway. Also make sure to include jitpack.io in your build script repositories. Also I documented this here.

@01e9
Copy link
Author

@01e9 01e9 commented May 25, 2018

Thank you for the release!

dohrayme pushed a commit to dohrayme/flyway that referenced this issue Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.