(feat): Added quotas storage module to keep track of storage usage #2643
Ticket(s) / Related Merge Requests
Summary of Changes
Added new module to store assets storage usage and added graphql queries to fetch details about the stored assets per tenant and per user.
Testing Considerations
Upload a video and make sure the details are stored correctly in the database. Can check via calling the graphql query.
Deployment Considerations
Must apply this new table to Vitess:
CREATE TABLE IF NOT EXISTS minds_asset_storage (
`id` int NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`entity_guid` bigint NOT NULL,
`entity_type` int NOT NULL,
`filename` varchar(256) NOT NULL,
`owner_guid` bigint NOT NULL,
`tenant_id` bigint DEFAULT NULL,
`size_bytes` bigint NOT NULL,
`duration_seconds` int DEFAULT NULL,
`created_timestamp` timestamp DEFAULT CURRENT_TIMESTAMP,
`updated_timestamp` timestamp DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
`deleted` boolean NOT NULL DEFAULT FALSE,
UNIQUE KEY (`tenant_id`, `entity_guid`, `filename`),
INDEX (`owner_guid`),
INDEX (`deleted`)
);
Regression Scope
- Video Uploads
Platform Affected (web, mobile, etc)
engine
Developer Testing Completed
Screenshots / Screen Recording
Does this impact
-
Localization -
Dark/light mode -
Guest mode
Definition of Done Checklist
-
The Acceptance Criteria has been met -
Code is tested: Testing includes unit/spec, E2E/automated and manual testing -
Merge requests description has been filled out
Edited by Fausto Arcidiacono