实现店铺联系电话精确查询与索引
This commit is contained in:
2
migrations/000160_add_shop_contact_phone_index.down.sql
Normal file
2
migrations/000160_add_shop_contact_phone_index.down.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
-- 回滚联系电话查询索引,不修改店铺业务数据。
|
||||
DROP INDEX IF EXISTS idx_shop_contact_phone;
|
||||
4
migrations/000160_add_shop_contact_phone_index.up.sql
Normal file
4
migrations/000160_add_shop_contact_phone_index.up.sql
Normal file
@@ -0,0 +1,4 @@
|
||||
-- 为未软删除店铺的联系电话精确查询增加非唯一部分索引。
|
||||
CREATE INDEX idx_shop_contact_phone
|
||||
ON tb_shop USING btree (contact_phone)
|
||||
WHERE deleted_at IS NULL;
|
||||
Reference in New Issue
Block a user