| 36439 |
5 d 6 h |
amit |
/trunk/profitmandi-dao/src/main/ |
Add outlet_name field to FofoStore entity, set from address.name on store creation
Adds outlet_name (VARCHAR 255) to FofoStore entity so the store's display
name is persisted directly on fofo_store instead of requiring a join through
retailer_registered_address -> address every time it is needed.
Sets fofoStore.setOutletName(retailerAddress.getName()) in both creation
paths: RetailerServiceImpl.createFofoStoreCodeByRetailerId (primary) and
RetailerController.createFofoStore (secondary).
Includes migration SQL script (migration_outlet_name_to_fofo_store.sql) to
ALTER TABLE and backfill existing rows from address.name. Must be run during
low-traffic window - fofo_store is heavily queried and ALTER takes a metadata
lock that blocks all concurrent SELECTs. |
|
/trunk/profitmandi-dao/src/main/resources/sql/migration_outlet_name_to_fofo_store.sql
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/fofo/FofoStore.java /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/user/RetailerServiceImpl.java
|