Skip to content

Set columns to unsignedBigInteger & Add foreign key to parent id#375

Open
charisoudis wants to merge 4 commits intolazychaser:v4from
eurotechnik:v4
Open

Set columns to unsignedBigInteger & Add foreign key to parent id#375
charisoudis wants to merge 4 commits intolazychaser:v4from
eurotechnik:v4

Conversation

@charisoudis
Copy link

This pull request targets to two code improvements:

  1. According to latest Laravel release increment columns are now by default big integer. Thus static::PARENT_ID and static::LFT - static::RGT columns should also be set to unsignedBigInteger by default.
  2. Also, for better resulting db scheme parent id should be constrained with a foreign key constraint. This pull request add a foreign key constraint from static::PARENT_ID column to $idColumn = 'id' which is passed as an optional parameter to nestedSet() macro function.

@aimeos
Copy link

aimeos commented Feb 6, 2026

ID types are now configurable in https://github.com/aimeos/laravel-nestedset

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