Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 4 commits into
base: v4
Choose a base branch
from

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.

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.

1 participant