HarperFast / HarperFast/harper
`delete_records_before` errors if table missing `__createdtime__`
- Dominant language
- JavaScript
- Stars
- 89
- Forks
- 10
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 200
Description
### Bug Summary
Fails to bulk delete records if table doesn't have `__createdtime__`
### Reproduction Repository (if applicable)
_No response_
### Steps to Reproduce
Send a POST request with `operation: 'delete_records_before', date: new Date().toISOString()` and you'll see the following in the Harper logs:
```
[job/60] [error]: ClientError: Table must have a '__createdtime__' attribute or @createdTime timestamp defined to perform this operation
at ResourceBridge.deleteRecordsBefore (harper/dataLayer/harperBridge/ResourceBridge.ts:309:10)
at OperationFunctionObject.deleteFilesBefore (/harper/dataLayer/delete.js:69:35)
at job (/harper/server/jobs/jobProcess.js:57:35) {
statusCode: 400
}
```
The table is created using a GraphQL schema.
### Expected Behavior
Delete all records before a specific date.
### Actual Behavior
Returns error and does not delete any records.
### Platform
Harper 5.0.14
### Console Errors
_No response_
### Screenshots or Videos
_No response_
### Additional Context
_No response_
### Are you planning to fix this issue?
No, just reporting the issue
### First-time contributor support
- [ ] I'm new to contributing and would appreciate guidance on the process
- [ ] I'd like help understanding the project structure
- [ ] I need assistance with setting up the development environment
- [ ] I'm comfortable contributing, but new to this project specifically
Contributor guide
Assessment
This issue has not been assessed yet.