1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-06-25 14:43:15 +00:00
seahub/scripts/upgrade/sql/13.0.0/mysql/seafevents.sql
2025-05-20 10:15:01 +08:00

24 lines
922 B
SQL

CREATE TABLE IF NOT EXISTS `user_quota_usage` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(255) NOT NULL,
`org_id` int(11) NOT NULL,
`quota` bigint(20) DEFAULT NULL,
`usage` bigint(20) DEFAULT NULL,
`timestamp` datetime NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `idx_user_quota_usage_username` (`username`),
KEY `idx_user_quota_usage_timestamp` (`timestamp`),
KEY `idx_user_quota_usage_org_id` (`org_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE IF NOT EXISTS `org_quota_usage` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`org_id` int(11) NOT NULL,
`quota` bigint(20) DEFAULT NULL,
`usage` bigint(20) DEFAULT NULL,
`timestamp` datetime NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `idx_org_quota_usage_org_id` (`org_id`),
KEY `idx_org_quota_usage_timestamp` (`timestamp`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;