veramo
veramo copied to clipboard
[BUG] Remove `dataStoreORMGetIdentifiers` methods
The existing IDataStoreORM
interface defines 2 methods (dataStoreORMGetIdentifiers
and dataStoreORMGetIdentifiersCount
) that theoretically provide the ability to query for DIDs based on the did
value, the alias
or the provider
. However, this is based on the assumption that the IDIDManager
plugin, or to be more precise the AbstractDIDStore
implementation uses the same database as the IDataStore
/IDataStoreORM
plugin implementations.
There is also the assumption that saving a credential, presentation or message to the database would automatically link it to the respective DID, or add new partial IIdentifier
entries based on issuer/subject, holder/verifier, from/to properties of the idem being added, and that deleting such an identifier would also automatically delete the data related to it.
These are separate concerns, so the IDataStoreORM
interface should not require these methods to be implemented, nor that the data related to a particular identifier is automatically deleted.
The methods are marked as deprecated and should be removed in Veramo 4.x
- [ ] remove
dataStoreORMGetIdentifiers
anddataStoreORMGetIdentifiersCount
fromIDataStoreORM
interface - [ ] remove
dataStoreORMGetIdentifiers
anddataStoreORMGetIdentifiersCount
from@veramo/data-store
- [ ] remove
IIdentifier
foreign keys from the respective@veramo/data-store#Entities
- [ ] add migration to remove cascading
- [ ] add test to check migration from earlier database version
- [ ] remove
dataStoreORMGetIdentifiers
anddataStoreORMGetIdentifiersCount
from@veramo/data-store-json
- [ ] add test to ensure that data other does not get deleted along with an
IIdentifier
entry.