Chevereto stores the images in date folders for example if an image is uploaded Monday, June 17 it will put it in 17/06/19.
Here is the structure of the chevereto database :
Albums
Code: Select all
DROP TABLE IF EXISTS `%table_prefix%albums`;
CREATE TABLE `%table_prefix%albums` (
`album_id` bigint(32) NOT NULL AUTO_INCREMENT,
`album_name` varchar(100) NOT NULL,
`album_user_id` bigint(32) DEFAULT NULL,
`album_date` datetime NOT NULL,
`album_date_gmt` datetime NOT NULL,
`album_creation_ip` varchar(255) NOT NULL,
`album_privacy` enum('public','password','private','private_but_link','custom') DEFAULT 'public',
`album_privacy_extra` mediumtext,
`album_password` mediumtext,
`album_image_count` bigint(32) NOT NULL DEFAULT '0',
`album_description` mediumtext,
`album_likes` bigint(32) NOT NULL DEFAULT '0',
`album_views` bigint(32) NOT NULL DEFAULT '0',
PRIMARY KEY (`album_id`),
KEY `album_name` (`album_name`),
KEY `album_user_id` (`album_user_id`),
KEY `album_date_gmt` (`album_date_gmt`),
KEY `album_privacy` (`album_privacy`),
KEY `album_image_count` (`album_image_count`),
KEY `album_creation_ip` (`album_creation_ip`),
FULLTEXT KEY `searchindex` (`album_name`,`album_description`)
) ENGINE=%table_engine% DEFAULT CHARSET=utf8mb4;
Categories
Code: Select all
DROP TABLE IF EXISTS `%table_prefix%categories`;
CREATE TABLE `%table_prefix%categories` (
`category_id` bigint(32) NOT NULL AUTO_INCREMENT,
`category_name` varchar(32) NOT NULL,
`category_url_key` varchar(32) NOT NULL,
`category_description` mediumtext,
PRIMARY KEY (`category_id`),
UNIQUE KEY `url_key` (`category_url_key`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
confirmations
Code: Select all
DROP TABLE IF EXISTS `%table_prefix%confirmations`;
CREATE TABLE `%table_prefix%confirmations` (
`confirmation_id` bigint(32) NOT NULL AUTO_INCREMENT,
`confirmation_user_id` bigint(32) NOT NULL,
`confirmation_type` enum('account-activate','account-change-email','account-password-forgot') NOT NULL,
`confirmation_date` datetime NOT NULL,
`confirmation_date_gmt` datetime NOT NULL,
`confirmation_token_hash` varchar(255) NOT NULL,
`confirmation_status` enum('active','valid','invalid') NOT NULL,
`confirmation_extra` mediumtext,
PRIMARY KEY (`confirmation_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
deletions
Code: Select all
DROP TABLE IF EXISTS `%table_prefix%deletions`;
CREATE TABLE `%table_prefix%deletions` (
`deleted_id` bigint(32) NOT NULL AUTO_INCREMENT,
`deleted_date_gmt` datetime NOT NULL,
`deleted_content_id` bigint(32) NOT NULL,
`deleted_content_date_gmt` datetime NOT NULL,
`deleted_content_user_id` bigint(32) DEFAULT NULL,
`deleted_content_ip` varchar(255) NOT NULL,
`deleted_content_md5` varchar(32) DEFAULT NULL,
`deleted_content_original_filename` varchar(255) DEFAULT NULL,
`deleted_content_views` bigint(32) NOT NULL DEFAULT '0',
`deleted_content_likes` bigint(32) NOT NULL DEFAULT '0',
PRIMARY KEY (`deleted_id`),
KEY `deleted_content_id` (`deleted_content_id`),
KEY `deleted_content_user_id` (`deleted_content_user_id`),
KEY `deleted_content_ip` (`deleted_content_ip`),
KEY `deleted_content_md5` (`deleted_content_md5`),
KEY `deleted_content_views` (`deleted_content_views`),
KEY `deleted_content_likes` (`deleted_content_likes`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
follows
Code: Select all
DROP TABLE IF EXISTS `%table_prefix%follows`;
CREATE TABLE `%table_prefix%follows` (
`follow_id` bigint(32) NOT NULL AUTO_INCREMENT,
`follow_date` datetime NOT NULL,
`follow_date_gmt` datetime NOT NULL,
`follow_user_id` bigint(32) NOT NULL,
`follow_followed_user_id` bigint(32) NOT NULL,
`follow_ip` varchar(255) NOT NULL,
PRIMARY KEY (`follow_id`),
KEY `follow_user_id` (`follow_user_id`),
KEY `follow_followed_user_id` (`follow_followed_user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
images
Code: Select all
DROP TABLE IF EXISTS `%table_prefix%images`;
CREATE TABLE `%table_prefix%images` (
`image_id` bigint(32) NOT NULL AUTO_INCREMENT,
`image_name` varchar(255) NOT NULL,
`image_extension` varchar(255) NOT NULL,
`image_size` int(11) NOT NULL,
`image_width` int(11) NOT NULL,
`image_height` int(11) NOT NULL,
`image_date` datetime NOT NULL,
`image_date_gmt` datetime NOT NULL,
`image_title` varchar(100) DEFAULT NULL,
`image_description` mediumtext,
`image_nsfw` tinyint(1) NOT NULL DEFAULT '0',
`image_user_id` bigint(32) DEFAULT NULL,
`image_album_id` bigint(32) DEFAULT NULL,
`image_uploader_ip` varchar(255) NOT NULL,
`image_storage_mode` enum('datefolder','direct','old','path') NOT NULL DEFAULT 'datefolder',
`image_path` varchar(4096) DEFAULT NULL,
`image_storage_id` bigint(32) DEFAULT NULL,
`image_md5` varchar(32) NOT NULL,
`image_source_md5` varchar(32) DEFAULT NULL,
`image_original_filename` varchar(255) NOT NULL,
`image_original_exifdata` longtext,
`image_views` bigint(32) NOT NULL DEFAULT '0',
`image_category_id` bigint(32) DEFAULT NULL,
`image_chain` tinyint(128) NOT NULL,
`image_thumb_size` int(11) NOT NULL,
`image_medium_size` int(11) NOT NULL DEFAULT '0',
`image_expiration_date_gmt` datetime DEFAULT NULL,
`image_likes` bigint(32) NOT NULL DEFAULT '0',
`image_is_animated` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`image_id`),
KEY `image_name` (`image_name`),
KEY `image_extension` (`image_extension`),
KEY `image_size` (`image_size`),
KEY `image_width` (`image_width`),
KEY `image_height` (`image_height`),
KEY `image_date_gmt` (`image_date_gmt`),
KEY `image_nsfw` (`image_nsfw`),
KEY `image_user_id` (`image_user_id`),
KEY `image_album_id` (`image_album_id`),
KEY `image_uploader_ip` (`image_uploader_ip`),
KEY `image_storage_mode` (`image_storage_mode`),
KEY `image_path` (`image_path`(255)),
KEY `image_storage_id` (`image_storage_id`),
KEY `image_md5` (`image_md5`),
KEY `image_source_md5` (`image_source_md5`),
KEY `image_views` (`image_views`),
KEY `image_category_id` (`image_category_id`),
KEY `image_chain` (`image_chain`),
KEY `image_expiration_date_gmt` (`image_expiration_date_gmt`),
KEY `image_likes` (`image_likes`),
KEY `image_is_animated` (`image_is_animated`),
KEY `image_album_id_image_id` (`image_album_id`, `image_id`),
FULLTEXT KEY `searchindex` (`image_name`,`image_title`,`image_description`,`image_original_filename`)
) ENGINE=%table_engine% DEFAULT CHARSET=utf8mb4;
users
Code: Select all
DROP TABLE IF EXISTS `%table_prefix%users`;
CREATE TABLE `%table_prefix%users` (
`user_id` bigint(32) NOT NULL AUTO_INCREMENT,
`user_name` varchar(255) DEFAULT NULL,
`user_username` varchar(191) NOT NULL,
`user_date` datetime NOT NULL,
`user_date_gmt` datetime NOT NULL,
`user_email` varchar(191) DEFAULT NULL,
`user_avatar_filename` varchar(255) DEFAULT NULL,
`user_facebook_username` varchar(255) DEFAULT NULL,
`user_twitter_username` varchar(255) DEFAULT NULL,
`user_website` varchar(255) DEFAULT NULL,
`user_background_filename` varchar(255) DEFAULT NULL,
`user_bio` varchar(255) DEFAULT NULL,
`user_timezone` varchar(255) NOT NULL,
`user_language` varchar(255) DEFAULT NULL,
`user_status` enum('valid','awaiting-confirmation','awaiting-email','banned') NOT NULL,
`user_is_admin` tinyint(1) NOT NULL DEFAULT '0',
`user_is_manager` tinyint(1) NOT NULL DEFAULT '0',
`user_is_private` tinyint(1) NOT NULL DEFAULT '0',
`user_newsletter_subscribe` tinyint(1) NOT NULL DEFAULT '1',
`user_show_nsfw_listings` tinyint(1) NOT NULL DEFAULT '0',
`user_image_count` bigint(32) NOT NULL DEFAULT '0',
`user_album_count` bigint(32) NOT NULL DEFAULT '0',
`user_image_keep_exif` tinyint(1) NOT NULL DEFAULT '1',
`user_image_expiration` varchar(191) DEFAULT NULL,
`user_registration_ip` varchar(191) NOT NULL,
`user_likes` bigint(32) NOT NULL DEFAULT '0' COMMENT 'Likes made to content owned by this user',
`user_liked` bigint(32) NOT NULL DEFAULT '0' COMMENT 'Likes made by this user',
`user_following` bigint(32) NOT NULL DEFAULT '0',
`user_followers` bigint(32) NOT NULL DEFAULT '0',
`user_content_views` bigint(32) NOT NULL DEFAULT '0',
`user_notifications_unread` bigint(32) NOT NULL DEFAULT '0',
PRIMARY KEY (`user_id`),
UNIQUE KEY `username` (`user_username`) USING BTREE,
UNIQUE KEY `email` (`user_email`) USING BTREE,
KEY `user_date_gmt` (`user_date_gmt`),
KEY `user_status` (`user_status`),
KEY `user_is_admin` (`user_is_admin`),
KEY `user_is_manager` (`user_is_manager`),
KEY `user_is_private` (`user_is_private`),
KEY `user_newsletter_subscribe` (`user_newsletter_subscribe`),
KEY `user_show_nsfw_listings` (`user_show_nsfw_listings`),
KEY `user_image_count` (`user_image_count`),
KEY `user_album_count` (`user_album_count`),
KEY `user_image_keep_exif` (`user_image_keep_exif`),
KEY `user_image_expiration` (`user_image_expiration`),
KEY `user_registration_ip` (`user_registration_ip`),
KEY `user_likes` (`user_likes`),
KEY `user_following` (`user_following`),
KEY `user_followers` (`user_followers`),
KEY `user_liked` (`user_liked`),
KEY `user_content_views` (`user_content_views`),
FULLTEXT KEY `searchindex` (`user_name`,`user_username`)
) ENGINE=%table_engine% DEFAULT CHARSET=utf8mb4;
you can find all the data on github here:
https://github.com/Chevereto/Chevereto- ... nstall/sql
Can we start creating the plugin ?