sunetdrive/templates/mariadb/05-roundcube.sql.erb
Micke Nordin 3c815b9a38
Add sql for roundcube
Signed-off-by: Micke Nordin <kano@sunet.se>
2025-03-26 12:52:14 +01:00

8 lines
1.3 KiB
Text

CREATE SCHEMA roundcube;
CREATE USER 'roundcube'@'%' IDENTIFIED BY '<%= @roundcube_password %>';
GRANT ALL PRIVILEGES ON roundcube.* TO 'roundcube'@'%' IDENTIFIED BY '<%= @roundcube_password %>';
-- USE roundcube;
-- CREATE TABLE `cache` ( `user_id` int(10) unsigned NOT NULL, `cache_key` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL, `expires` datetime DEFAULT NULL, `data` longtext NOT NULL, PRIMARY KEY
-- (`user_id`,`cache_key`), KEY `expires_index` (`expires`), CONSTRAINT `user_id_fk_cache` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC
-- CREATE TABLE `users` ( `user_id` int(10) unsigned NOT NULL AUTO_INCREMENT, `username` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL, `mail_host` varchar(128) NOT NULL, `created` datetime NOT
-- NULL DEFAULT '1000-01-01 00:00:00', `last_login` datetime DEFAULT NULL, `failed_login` datetime DEFAULT NULL, `failed_login_counter` int(10) unsigned DEFAULT NULL, `language` varchar(16) DEFAULT NULL, `preferences` longtext DEFAULT NULL, PRIMARY KEY (`user_id`), UNIQUE KEY `username` (`username`,`mail_host`)) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;