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

migrate SQL Server Schemas to NVARCHAR #652

Merged
merged 4 commits into from
Sep 22, 2022

Conversation

leviramsey
Copy link
Contributor

References #650

@leviramsey
Copy link
Contributor Author

Re: docs, I'm not sure where a "if using a journal/snapshot store created with Akka Persistence versions 5.0.4 and earlier, it is advised to disable the JDBC client's sending strings as unicode" note should go.

@leviramsey
Copy link
Contributor Author

Thoughts on restructuring the docs along the lines of the Cassandra plugin with notes for the different DBs?

@octonato
Copy link
Member

About the docs, I think we should add it to the migration guide.

Now it's a good moment to do it. We have another PR, less critical, that will also require a migration guide.

And we didn't documented the migration tool that was added in #603.

Maybe we should go for 5.1.0 because of the DB changes.

@leviramsey
Copy link
Contributor Author

leviramsey commented Mar 29, 2022

We should document a recommendation if using the old (VARCHAR-based) SQL Server schemas (regardless of APJDBC version) to use the ;sendStringParametersAsUnicode=false connection parameter.

To my knowledge it's not a simple migration from the old schema to the new schema, and as far as Slick is concerned it's the same schema (in that the JVM types each column maps to are unchanged).

@leviramsey
Copy link
Contributor Author

Actually I guess we can support offline migration of data from an old journal/snapshot-store to a new journal/snapshot-store, but I think it would be generally preferable from the user perspective to use the old schema and configure JDBC to work properly with the old schema.

That said, the migration tool would support the "turns out, we need unicode persistence IDs or tags" use case.

@patriknw
Copy link
Member

@leviramsey would it be possible to push this forward?

@leviramsey
Copy link
Contributor Author

I guess the question is if we want to implement a migration tool (which honestly is not something I'm confident on being able to implement any time soon).

As it is, this should just be mergeable (it requires no code changes, AFAIK), perhaps with docs around ;sendStringParametersAsUnicode=false for use with previous versions of the schema.

Copy link
Member

@patriknw patriknw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good. We don't need to provide a migration tool. DBAs (or any developer with some google skills) can do that with SQL.

Only a small addition of the version numbers.

@patriknw patriknw marked this pull request as ready for review September 20, 2022 08:39
@patriknw patriknw merged commit 10b2e09 into akka:master Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants