Is there a way for multiple modules to contribute into a single Index table? #11092
Replies: 2 comments
-
The recommended way of handling such scenarios is to create a new index for the new part. You can use such indices together as well (i.e. with an SQL Is there a particular reason why you don't want to create a new index? |
Beta Was this translation helpful? Give feedback.
-
@CrestApps Event if technically it could possible - It's not good idea - Let suppose you have one module that creates a table with three columns and defines an Index containing three properties, and the second module that alter that table to add two more columns and replaces index defined by first module and defines new index with five properties - to achieve that you define referential and code dependency between two modules - In other words you will have tightly coupled two modules - If it's needs tightly coupled then why do you define two modules - instead you define two features in same module. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a customers module that provides the user a way to manage customer info. This module creates a SQL table "index" to index the customer data for quicker search.
I also have another modules that depends on the customers module. This module would extend the customer content-type by attaching new part. I would want the second module to contribute to the index by adding new columns and add data to it.
I can use a migration to alter the index and add the new column with no problem. However, I am not sure how I would extend the
CustomerIndex
and theCustomerIndexProvider
so that the index is populated correctly.Beta Was this translation helpful? Give feedback.
All reactions