1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-07-04 02:36:59 +00:00
seahub/scripts/upgrade/sql/13.0.0/mysql/seafevents.sql

24 lines
922 B
MySQL
Raw Normal View History

2025-05-20 02:15:01 +00:00
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;