Skip to content

Added methods cascadeOnDelete(), restrictOnDelete(), noActionOnDelete(), restrictOnUpdate(), nullOnUpdate(), noActionOnUpdate() for ForeignKeyDefinition.#7693

Merged
limingxinleo merged 3 commits intohyperf:masterfrom
binaryfire:feature/foreign-key-definition-convenience-methods
Jan 8, 2026
Merged

Conversation

@binaryfire
Copy link
Contributor

Add the following methods that exist in Laravel but were missing in Hyperf:

  • cascadeOnDelete()
  • restrictOnDelete()
  • noActionOnDelete()
  • restrictOnUpdate()
  • nullOnUpdate()
  • noActionOnUpdate()

Includes tests for MySQL, PostgreSQL, and SQLite grammars.

binaryfire and others added 3 commits January 6, 2026 05:50
Add the following methods that exist in Laravel but were missing in Hyperf:
- cascadeOnDelete()
- restrictOnDelete()
- noActionOnDelete()
- restrictOnUpdate()
- nullOnUpdate()
- noActionOnUpdate()

Includes tests for MySQL, PostgreSQL, and SQLite grammars.
@limingxinleo limingxinleo changed the title feat: Add missing ForeignKeyDefinition convenience methods from Laravel Added methods cascadeOnDelete(), restrictOnDelete(), noActionOnDelete(), restrictOnUpdate(), nullOnUpdate(), noActionOnUpdate() for ForeignKeyDefinition. Jan 8, 2026
@limingxinleo limingxinleo merged commit b3b686e into hyperf:master Jan 8, 2026
56 of 60 checks passed
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.

2 participants