patka / cassandra-migration

Schema migration library for Cassandra
MIT License
152 stars 47 forks source link

Spring boot 2.3.* support #58

Closed seed10 closed 3 years ago

seed10 commented 3 years ago

Hi,

Are there any plans for the library to support spring boot 2+? the current spring boot version being used is 1.5.21.RELEASE

mariusJar commented 3 years ago

Hello, Library supports Spring Boot 2+ currently. We are using it with 2.1.4.RELEASE version at my current company without any issues.

seed10 commented 3 years ago

@mariusJar Thanks, I was using 2.2.5 and it worked with out any issues, after upgrading to 2.3.4, the library doesn't work

patka commented 3 years ago

Hello,

can you describe the issue you are having with 2.3.4? How is it failing? Just to know what to look for.

So long, Patrick

seed10 commented 3 years ago

Hi @patka

There is no issue in the logs, the migration scripts just don't seem to get executed when using spring boot 2.3.4

Spring boot 2.3+ got released with cassandra breaking changes

when i use 2.2.5 it works fine. cc

patka commented 3 years ago

Hey @seed10,

the cassandra-migration library is not relying on any cassandra classes from Spring. It just uses the context to configure the beans so that should normally not be an issue. Do you also use the version of cassandra-migration that works with version 4 of the datastax driver as it seems to me that is the main difference between spring boot 2.2 and 2.3. The latest version for that would be 2.4.0_v4.

seed10 commented 3 years ago

@patka I am using cassandra-migration-spring-boot-starter version:2.4.0

patka commented 3 years ago

Can you give it a try using cassandra-migration-spring-boot-starter version:2.4.0_v4

seed10 commented 3 years ago

@patka When using 2.4.0_v4 i am faced with the following issue:

Error creating bean with name 'migrationTask' defined in class path resource [org/cognitor/cassandra/migration/spring/CassandraMigrationAutoConfiguration.class]: Unsatisfied dependency expressed through method 'migrationTask' parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.datastax.oss.driver.api.core.CqlSession'

I am using cassandra driver version 4.0.0 as well.

I dont see these errors when using cassandra-migration-spring-boot-starter version:2.4.0, how ever the migration doent load.

patka commented 3 years ago

Please have a look at the README: https://github.com/patka/cassandra-migration#datastax-driver-version-4

That should solve your problem.

seed10 commented 3 years ago

Thanks so much @patka i missed that :) Resolved, my apologies

patka commented 3 years ago

No worries, glad that the library is useful to you and it was so easy to solve this :)