flagr
flagr copied to clipboard
[WIP] Add mssql support
Description
Fix https://github.com/checkr/flagr/issues/326
Motivation and Context
Add support for mssql
How Has This Been Tested?
Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
- [ ] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.
Codecov Report
Merging #331 into master will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## master #331 +/- ##
=======================================
Coverage 81.91% 81.91%
=======================================
Files 26 26
Lines 1537 1537
=======================================
Hits 1259 1259
Misses 209 209
Partials 69 69
Impacted Files | Coverage Δ | |
---|---|---|
pkg/entity/db.go | 76.47% <ø> (ø) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update f10c6a9...3ce9943. Read the comment docs.
Hello and thanks for this quick response. I tried using your branch with an mssql database. However when i create a new flag the "updated_by" field is not populated. And when i try to edit the flag i get an error (see attachment).
Also the logs point to /go/src/github.com/checkr/flagr/pkg/handler/crud.go:150
thanks, can you help check anything special we need to do for column types and automigrate that may be specific to mssql?
It's a WIP, I think I may want to add some integration tests for mssql connection. Just like other DBs.
So after a bit of trial and error I fixed the issues by doing the following:
- flag_snapshot.go: line 19: change of
sql:"type:text"
--->sql:"type:varbinary(max)"
- flag.go: removal of .Order("id ASC") in func PreloadSegmentsVariants for both Segments and Variants
Stale pull request message