sentinel
sentinel copied to clipboard
[4.0] Add Foreign Keys
Hi,
I just notices there are no database relationships defined in the migrations and .sql files provided with sentinel.
Wouldn't it be better to add these relationships by default?
If you mean foreign keys, we currently don't have any plans to add these.
If that's not it, please elaborate what you mean by relations on the .sql files.
I mean foreign keys indeed.
Is there any reason why you won't implement them?
https://github.com/cartalyst/sentinel/issues/40 which comes from https://github.com/cartalyst/sentry/pull/106
I honestly don't really mind having them, but i would prefer avoid adding them now (to the current version) and prefer that you add them on your end with a migration, like @bencorlett suggested.
What we can do though, is to add FK's to Sentinel 3 and i can mark this "issue" as a proposal and pretty much target it to Sentinel 3.
Thoughts?
I will add them via a migration for the time being.
For Sentinel 3 I would propose to add them to ensure readability when creating large database models, with the sentinel migration (out of the box).
cheers.
Awesome.
I've renamed the title and added a label to it.
We'll be adding FK's on the next version.
Nice. For now, i'm adding they within a new migration file.
@ricardovigatti can you give me - a newbie here - a brief idea of what is a migration file here and how can I use it?
@odahcam, i've been using Sentinel within Laravel. From they docs:
Migrations are like version control for your database, allowing your team to easily modify and share the application's database schema.
https://laravel.com/docs/5.4/migrations