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 when create | recreate collection #2812

Answered by GromNaN
AbdallahTarabish asked this question in Q&A
Discussion options

when delete a collection and recreate it, the indexes associated with that collection are not automatically recreated ,this is because index creation is not a default behavior during collection creation,
what's the solution ?

You must be logged in to vote

Indexes are part of the schema management feature. You can use Laravel Migrations to manage your indexes.
https://www.mongodb.com/docs/drivers/php/laravel-mongodb/current/eloquent-models/schema-builder/#manage-indexes

Replies: 1 comment

Comment options

Indexes are part of the schema management feature. You can use Laravel Migrations to manage your indexes.
https://www.mongodb.com/docs/drivers/php/laravel-mongodb/current/eloquent-models/schema-builder/#manage-indexes

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

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