Skip to content

Add database constraints for chat data - #181

Merged
llbbl merged 1 commit into
masterfrom
feature/issue-131-database-constraints
Sep 18, 2026
Merged

llbbl merged 1 commit into
masterfrom
feature/issue-131-database-constraints

Conversation

@llbbl

@llbbl llbbl commented Sep 17, 2026

Copy link
Copy Markdown
Owner

Closes #131

Summary

  • Add cross-engine CHECK constraints for usernames, password-hash prefixes, message length, and positive timestamps.
  • Normalize message authorship to nullable user_id with username backfill, foreign-key behavior, and archive parity.
  • Update application joins, exports, commands, seed data, migration safety, and schema documentation.

Testing

  • composer test:all
  • composer test:integration:websocket
  • composer analyse
  • composer cs-check
  • pnpm check
  • pnpm build
  • pnpm e2e
  • Direct constraint-violation integration coverage on SQLite and MySQL
  • Independent PHP and migration reviews passed
  • Mutation tests were intentionally not run because they are manual-only.

@llbbl
llbbl merged commit 3b24768 into master Sep 18, 2026
8 checks passed
@llbbl
llbbl deleted the feature/issue-131-database-constraints branch September 18, 2026 12:44
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.

Database-level data validation and constraints

1 participant