Skip to content

Commit ec2e737

Browse files
committed
Simplify store metadata - remove schema tracking
- Removed schemas array from dj-store-meta.json - 1:1 correspondence between database+project_name and store assumed - DataJoint performs basic project_name verification on connect - Enforcement is administrative responsibility, not DataJoint's
1 parent af6cef2 commit ec2e737

File tree

1 file changed

+7
-16
lines changed

1 file changed

+7
-16
lines changed

docs/src/design/tables/file-type-spec.md

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,7 @@ s3://bucket/my_project/dj-store-meta.json
164164
"project_name": "my_project",
165165
"created": "2025-01-15T10:30:00Z",
166166
"format_version": "1.0",
167-
"datajoint_version": "0.15.0",
168-
"schemas": ["schema1", "schema2"]
167+
"datajoint_version": "0.15.0"
169168
}
170169
```
171170

@@ -177,7 +176,6 @@ s3://bucket/my_project/dj-store-meta.json
177176
| `created` | string | Yes | ISO 8601 timestamp of store creation |
178177
| `format_version` | string | Yes | Store format version for compatibility |
179178
| `datajoint_version` | string | Yes | DataJoint version that created the store |
180-
| `schemas` | array | No | List of schemas using this store (updated on schema creation) |
181179

182180
### Store Initialization
183181

@@ -197,7 +195,7 @@ The store metadata file is created when the first `file` attribute is used:
197195

198196
### Client Verification
199197

200-
All DataJoint clients must use **identical `project_name`** settings to ensure store-database cohesion:
198+
DataJoint performs a basic verification on connect to ensure store-database cohesion:
201199

202200
1. **On connect**: Client reads `dj-store-meta.json` from store
203201
2. **Verify**: `project_name` in client settings matches store metadata
@@ -211,20 +209,13 @@ DataJointError: Object store project name mismatch.
211209
Ensure all clients use the same object_storage.project_name setting.
212210
```
213211

214-
### Schema Registration
212+
### Administrative Responsibility
215213

216-
When a schema first uses the `file` type, it is added to the `schemas` list in the metadata:
214+
A 1:1 correspondence is assumed between:
215+
- Database location + `project_name` in client settings
216+
- Object store + `project_name` in store metadata
217217

218-
```python
219-
# After creating Recording table with file attribute in my_schema
220-
# dj-store-meta.json is updated:
221-
{
222-
"project_name": "my_project",
223-
"schemas": ["my_schema"] # my_schema added
224-
}
225-
```
226-
227-
This provides a record of which schemas have data in the store.
218+
DataJoint performs basic verification but does **not** enforce this mapping. Administrators are responsible for ensuring correct configuration across all clients.
228219

229220
## Syntax
230221

0 commit comments

Comments
 (0)