The motivation for this PR is to enable users to write migrations against Cassandra clusters that require authentication.
There are 2 commits. The first enables credentials to be passed through the joplin.edn configuration to the Cassandra connection. The second commit ensures that the user's migration code is run against the cluster containing the migration table. By creating one cassandra connection at the beginning of the work and using it both for manipulating ragtime's migration table and handing it to the user's migration code, it can ensure all side effects are applied to the same cluster.
The need for this second commit arose during testing the authentication work. My migration code (which had to create its own cassandra connection) was erroneously configuring itself via mount in my development system. It should have instead been using the configuration that joplin had computed.
We can certainly split this PR into 2 if desired!
Thanks for your work on Joplin!
Update: I pushed a 3rd commit that simply removes dead code.
The motivation for this PR is to enable users to write migrations against Cassandra clusters that require authentication.
There are 2 commits. The first enables credentials to be passed through the
joplin.edn
configuration to the Cassandra connection. The second commit ensures that the user's migration code is run against the cluster containing themigration
table. By creating one cassandra connection at the beginning of the work and using it both for manipulating ragtime'smigration
table and handing it to the user's migration code, it can ensure all side effects are applied to the same cluster.The need for this second commit arose during testing the authentication work. My migration code (which had to create its own cassandra connection) was erroneously configuring itself via mount in my development system. It should have instead been using the configuration that joplin had computed.
We can certainly split this PR into 2 if desired!
Thanks for your work on Joplin!
Update: I pushed a 3rd commit that simply removes dead code.