mirror of
https://github.com/openvk/openvk
synced 2025-01-30 03:25:27 +03:00
2d83003b6c
* create document entity * add upload, previews, most of api methods * ui start * better ui, search, uploading (icons by myslivets) Co-Authored-By: Daniel <60743585+myslivets@users.noreply.github.com> * add editing functions * add viewer and gallery * preparations for picker * things * add counter on tab * add tags * fix gif processing * fix png processing * picker * addd search * add fast uploader * openvk midn. support, change midn.photomodal color * fix low register format chekc * add gif play on click * unauthorized limitations --------- Co-authored-by: Daniel <60743585+myslivets@users.noreply.github.com>
28 lines
1.4 KiB
SQL
28 lines
1.4 KiB
SQL
CREATE TABLE `documents` (
|
|
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
|
|
`owner` BIGINT(20) NOT NULL,
|
|
`virtual_id` BIGINT(20) UNSIGNED NOT NULL,
|
|
`hash` CHAR(128) NOT NULL,
|
|
`owner_hidden` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1',
|
|
`copy_of` BIGINT(20) UNSIGNED NULL DEFAULT NULL,
|
|
`created` BIGINT(20) UNSIGNED NOT NULL,
|
|
`edited` BIGINT(20) UNSIGNED NULL DEFAULT NULL,
|
|
`name` VARCHAR(256) NOT NULL,
|
|
`original_name` VARCHAR(500) NULL DEFAULT NULL,
|
|
`access_key` VARCHAR(100) NULL DEFAULT NULL,
|
|
`format` VARCHAR(20) NOT NULL DEFAULT 'gif',
|
|
`type` TINYINT(10) UNSIGNED NOT NULL DEFAULT '0',
|
|
`folder_id` TINYINT(10) UNSIGNED NOT NULL DEFAULT '0',
|
|
`preview` VARCHAR(200) NULL DEFAULT NULL,
|
|
`tags` VARCHAR(500) NULL DEFAULT NULL,
|
|
`filesize` BIGINT(20) UNSIGNED NOT NULL,
|
|
`deleted` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
|
|
`unlisted` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE = InnoDB COLLATE=utf8mb4_unicode_520_ci;
|
|
|
|
ALTER TABLE `documents` ADD INDEX (`deleted`);
|
|
ALTER TABLE `documents` ADD INDEX (`unlisted`);
|
|
ALTER TABLE `documents` ADD INDEX `virtual_id_id` (`virtual_id`, `id`);
|
|
ALTER TABLE `documents` ADD INDEX `folder_id` (`folder_id`);
|
|
ALTER TABLE `photos` ADD `system` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' AFTER `anonymous`, ADD `private` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' AFTER `system`;
|