Repository navigation
ci: run ScalaTests against SQL Server 2022 and resolve dialect incompatibilities - #2945
Merged
simonredfern merged 37 commits intoOct 16, 2026
Merged
Conversation
… and transaction locks
… and guard datetime ddl
The unique index on mappedentitlement is dropped only when it exists and is recreated only when it is missing, so a database that lacks an index of that name no longer fails the batch and aborts boot on every start.
…ep it NVARCHAR The guard compared a byte length with a character count, so an NVARCHAR column of 125 to 249 characters was skipped, and the ALTER turned the column into VARCHAR, which no longer matched the mapped model. The check now uses the character length and the column stays NVARCHAR(250).
…ld in the consent reference id migration
…e 8000-byte limit
…trigger the PR workflow
…d trimmed currency codes
…TETIME columns to DATETIME2
…e isSqlServer once
…when the database does not start
…ransaction list fails
…ntity can be cascade-deleted
…e delete by row id
# Conflicts: # obp-api/src/main/scala/code/api/util/http4s/Http4sStandardHeaders.scala # obp-api/src/main/scala/code/api/v5_0_0/Http4s500.scala
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



CI tests run against in-memory H2 by default. SQL Server 2022, SQL Server 2017 (CU20) or PostgreSQL 16 can be selected for a run through the
databaseinput of the manual workflow dispatch (h2,sqlserver,sqlserver2017,postgres), or by adding thetest-sqlserver/test-postgreslabel to a pull request. A sharedsetup-test-databaseaction starts and health-checks the container (pinned images, and the job fails if the database does not come up), generates the connection properties for it, and gives SQL Server and PostgreSQL shards a 75-minute limit instead of 25. The code is made to run on SQL Server: pagination and row locks go throughDoobieUtil.pagination,lockHintandforUpdate,isSqlServeris computed once,NOW()has a T-SQL form,string_aggoperands are cast toNVARCHAR(MAX), consent listing avoidsDISTINCTovertextcolumns, and DATETIME columns are upgraded to DATETIME2 at schemify time with their indexes, defaults and NOT NULL kept, so dates before 1753 are stored.The role name and metric consumer id migrations drop and recreate their dependent indexes around
ALTER COLUMNand keepNVARCHAR, the dynamic data id keepsNVARCHAR(255),v_consentis ensured once at the end of the migration chain, and the currency code migration trims trailing spaces on SQL Server, where they are otherwise ignored in comparisons. A row-level Dynamic Entity record keeps its<entity>_idthrough PUT and PATCH, and cascade delete of an entity finds its records by row id. New suites cover the DATETIME2 upgrade, the dialect helpers and the row-level update, and run against SQL Server when it is the test database; thecode.api.http4sbridgetest package is nowcode.api.http4sserver. All ten shards pass on H2, PostgreSQL 16, SQL Server 2022 and SQL Server 2017. Not covered yet: some consent and settlement-account scenarios have failed in local SQL Server runs and are not addressed here.