Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Indexing Slug Column in Migration? #231

Unanswered
N30 asked this question in Q&A
Discussion options

I was surprised to find that there was no emphasis on indexing the slug column in the example migrations, so I thought maybe I am missing something? What are some good practices in creating the table, should I add ->index() to the schema creating in the migration?

You must be logged in to vote

Replies: 1 comment

Comment options

You would probably want ->unique() to add a unique index that enforces no duplicate slugs.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants

AltStyle によって変換されたページ (->オリジナル) /