Skip to content

fix: setting value persistence on SQL Server#172

Open
michalsn wants to merge 2 commits into
codeigniter4:developfrom
michalsn:fix/sqlrv-2025-issue
Open

fix: setting value persistence on SQL Server#172
michalsn wants to merge 2 commits into
codeigniter4:developfrom
michalsn:fix/sqlrv-2025-issue

Conversation

@michalsn

Copy link
Copy Markdown
Member

Description
This PR fixes SQLSRV persistence errors caused by storing setting values in the deprecated TEXT column type. For SQLSRV databases, the value column is migrated to VARCHAR(MAX) while other database drivers remain unchanged.

Boolean values are now serialized as '1' and '0', preventing mixed-type batch insert failures. Existing stored settings are preserved, and the migration is compatible with SQL Server 2022 and 2025.

Ref:

Fixes #171

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@michalsn
michalsn requested a review from paulbalandan July 20, 2026 17:01
@michalsn michalsn added the bug Something isn't working label Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Attempting to store boolean value on SQLSRV causes database exception

2 participants