diff --git a/kong/db/declarative/import.lua b/kong/db/declarative/import.lua index 3d7b6fb687e1..1b2bfc727132 100644 --- a/kong/db/declarative/import.lua +++ b/kong/db/declarative/import.lua @@ -616,4 +616,6 @@ return { load_into_cache_with_events = load_into_cache_with_events, insert_entity_for_txn = insert_entity_for_txn, delete_entity_for_txn = delete_entity_for_txn, + + GLOBAL_WORKSPACE_TAG = GLOBAL_WORKSPACE_TAG, } diff --git a/kong/db/strategies/off/init.lua b/kong/db/strategies/off/init.lua index 7da712c2280b..d61e98b5c529 100644 --- a/kong/db/strategies/off/init.lua +++ b/kong/db/strategies/off/init.lua @@ -20,6 +20,7 @@ local item_key = declarative.item_key local item_key_prefix = declarative.item_key_prefix local workspace_id = declarative.workspace_id local foreign_field_key_prefix = declarative.foreign_field_key_prefix +local GLOBAL_WORKSPACE_TAG = declarative.GLOBAL_WORKSPACE_TAG local PROCESS_AUTO_FIELDS_OPTS = { @@ -330,7 +331,7 @@ local function select(self, pk, options) local pk = pk_string(schema, pk) -- if no specific ws_id is provided, we need to search all workspace ids - if ws_id == "*" then + if ws_id == GLOBAL_WORKSPACE_TAG then for workspace, err in kong.db.workspaces:each() do if err then return nil, err