@adobe/spacecat-shared-data-access 2.68.0 → 2.68.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [@adobe/spacecat-shared-data-access-v2.68.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.68.0...@adobe/spacecat-shared-data-access-v2.68.1) (2025-10-07)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * site indexes order ([#1008](https://github.com/adobe/spacecat-shared/issues/1008)) ([215a961](https://github.com/adobe/spacecat-shared/commit/215a961a681873f4cb1882e2c8a53f8db13e32ea))
7
+
1
8
  # [@adobe/spacecat-shared-data-access-v2.68.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.67.0...@adobe/spacecat-shared-data-access-v2.68.0) (2025-10-07)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/spacecat-shared-data-access",
3
- "version": "2.68.0",
3
+ "version": "2.68.1",
4
4
  "description": "Shared modules of the Spacecat Services - Data Access",
5
5
  "type": "module",
6
6
  "engines": {
@@ -34,8 +34,6 @@ Indexes Doc: https://electrodb.dev/en/modeling/indexes/
34
34
  const schema = new SchemaBuilder(Site, SiteCollection)
35
35
  // this will add an attribute 'organizationId' as well as an index 'byOrganizationId'
36
36
  .addReference('belongs_to', 'Organization')
37
- // this will add an attribute 'projectId' as well as an index 'byProjectId'
38
- .addReference('belongs_to', 'Project', ['updatedAt'], { required: false })
39
37
  // has_many references do not add attributes or indexes
40
38
  .addReference('has_many', 'Audits')
41
39
  .addReference('has_many', 'Experiments')
@@ -159,6 +157,15 @@ const schema = new SchemaBuilder(Site, SiteCollection)
159
157
  .addIndex(
160
158
  { composite: ['externalOwnerId'] },
161
159
  { composite: ['externalSiteId'] },
160
+ )
161
+ // Using regular index instead of belongs_to reference to control position
162
+ .addAttribute('projectId', {
163
+ type: 'string',
164
+ required: false,
165
+ })
166
+ .addIndex(
167
+ { composite: ['projectId'] },
168
+ { composite: ['updatedAt'] },
162
169
  );
163
170
 
164
171
  export default schema.build();