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

Set mssql nvarchar columns to fixed length to allow indexing #169

Merged
merged 4 commits into from
Nov 30, 2020

Conversation

proteusvacuum
Copy link
Contributor

We've had issues where columns are getting created in mssql that can't be indexed because the length is not getting set correctly.

https://dimagi-dev.atlassian.net/browse/SC-988?focusedCommentId=100916&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-100916

This change sets a max length, but then overrides this if any data is bigger than the 900 byte maximum. These resized columns will no longer be able to be indexed, but having indices on large columns seems funny anyway.

@proteusvacuum proteusvacuum merged commit 9e6be92 into master Nov 30, 2020
@proteusvacuum proteusvacuum deleted the fr/mssql-nvarchar branch November 30, 2020 14:47
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.

3 participants