From 89069c06948776d5951d8efee5e9786733e45898 Mon Sep 17 00:00:00 2001 From: Giuseppe Lo Presti Date: Thu, 6 Jul 2023 16:19:46 +0200 Subject: [PATCH 1/5] Imported current DB structure Included recent update scripts, current dump and a description of how the tables have been used in the past or are being used --- db/README.md | 49 ++ db/owncloud_db_dump.sql | 1130 ++++++++++++++++++++++++++++++++++++ db/setup_notifications.sql | 53 ++ db/setup_ocm.sql | 83 +++ 4 files changed, 1315 insertions(+) create mode 100644 db/README.md create mode 100644 db/owncloud_db_dump.sql create mode 100644 db/setup_notifications.sql create mode 100644 db/setup_ocm.sql diff --git a/db/README.md b/db/README.md new file mode 100644 index 0000000000..92cfde4757 --- /dev/null +++ b/db/README.md @@ -0,0 +1,49 @@ +CERNBox DB schema +================= + +The CERNBox database schema inherits the ownCloud 10 schema and adds Reva-specific tables. + +This file describes the state of the database following a reverse engineering analysis. + +The following tables with their corresponding cardinalities are used in production and referenced in Reva as of July 2023: + +* oc_preferences # 65K +* oc_share # 490K +* oc_share_status # 24K + +* cernbox_project_mapping # 1K +* cbox_metadata # 10K, to store favourites +* cbox_otg_ocis # empty, to be deprecated in favour of notifications + +* notifications +* notification_recipients + +* ocm_access_method_webapp +* ocm_access_method_webdav +* ocm_protocol_transfer +* ocm_protocol_webapp +* ocm_protocol_webdav +* ocm_received_share_protocols +* ocm_received_shares +* ocm_remote_users +* ocm_shares +* ocm_shares_access_methods +* ocm_tokens + +The following tables contain several records (possibly used by ownCloud in the past) but are not used by Reva: + +* oc_mounts +* oc_share_acl +* oc_share_acl_old +* oc_addressbooks +* oc_accounts + +The following tables were used in the past but not any longer: + +* cbox_canary +* cbox_office_engine + +The following table was populated by hand and it is not used by Reva: + +* oc_sciencemesh + diff --git a/db/owncloud_db_dump.sql b/db/owncloud_db_dump.sql new file mode 100644 index 0000000000..1454c42aa1 --- /dev/null +++ b/db/owncloud_db_dump.sql @@ -0,0 +1,1130 @@ +-- MySQL dump 10.14 Distrib 5.5.68-MariaDB, for Linux (x86_64) +-- +-- Host: dbod-cboxeos.cern.ch Database: cernboxngcopy +-- ------------------------------------------------------ +-- Server version 5.7.37-log + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `cbox_canary` +-- + +DROP TABLE IF EXISTS `cbox_canary`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `cbox_canary` ( + `username` varchar(255) NOT NULL DEFAULT '', + `adopter` varchar(10) DEFAULT NULL, + PRIMARY KEY (`username`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `cbox_metadata` +-- + +DROP TABLE IF EXISTS `cbox_metadata`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `cbox_metadata` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `item_type` int(11) NOT NULL, + `uid` varchar(64) NOT NULL, + `fileid_prefix` varchar(255) NOT NULL, + `fileid` varchar(255) NOT NULL, + `tag_key` varchar(255) NOT NULL, + `tag_val` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=11622 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `cbox_office_engine` +-- + +DROP TABLE IF EXISTS `cbox_office_engine`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `cbox_office_engine` ( + `username` varchar(255) NOT NULL DEFAULT '', + `office` varchar(255) DEFAULT NULL, + PRIMARY KEY (`username`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `cbox_otg` +-- + +DROP TABLE IF EXISTS `cbox_otg`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `cbox_otg` ( + `id` mediumint(9) NOT NULL AUTO_INCREMENT, + `message` text NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `cbox_otg_ocis` +-- + +DROP TABLE IF EXISTS `cbox_otg_ocis`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `cbox_otg_ocis` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `message` text NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `cernbox_project_mapping` +-- + +DROP TABLE IF EXISTS `cernbox_project_mapping`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `cernbox_project_mapping` ( + `project_name` varchar(50) NOT NULL, + `eos_relative_path` varchar(50) NOT NULL, + `project_owner` varchar(50) NOT NULL DEFAULT 'temp', + PRIMARY KEY (`project_name`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_account_terms` +-- + +DROP TABLE IF EXISTS `oc_account_terms`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_account_terms` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `account_id` bigint(20) unsigned NOT NULL, + `term` varchar(191) COLLATE utf8_bin NOT NULL, + PRIMARY KEY (`id`), + KEY `account_id_index` (`account_id`), + KEY `term_index` (`term`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_accounts` +-- + +DROP TABLE IF EXISTS `oc_accounts`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_accounts` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `email` varchar(255) COLLATE utf8_bin DEFAULT NULL, + `user_id` varchar(255) COLLATE utf8_bin NOT NULL, + `lower_user_id` varchar(255) COLLATE utf8_bin NOT NULL, + `display_name` varchar(255) COLLATE utf8_bin DEFAULT NULL, + `quota` varchar(32) COLLATE utf8_bin DEFAULT NULL, + `last_login` int(11) NOT NULL DEFAULT '0', + `backend` varchar(64) COLLATE utf8_bin NOT NULL, + `home` varchar(1024) COLLATE utf8_bin NOT NULL, + `state` smallint(6) NOT NULL DEFAULT '0' COMMENT '0: initial, 1: enabled, 2: disabled, 3: deleted', + PRIMARY KEY (`id`), + UNIQUE KEY `UNIQ_907AA303A76ED395` (`user_id`), + UNIQUE KEY `lower_user_id_index` (`lower_user_id`), + KEY `display_name_index` (`display_name`), + KEY `email_index` (`email`) +) ENGINE=InnoDB AUTO_INCREMENT=20725 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_addressbookchanges` +-- + +DROP TABLE IF EXISTS `oc_addressbookchanges`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_addressbookchanges` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `uri` varchar(255) COLLATE utf8_bin DEFAULT NULL, + `synctoken` int(10) unsigned NOT NULL DEFAULT '1', + `addressbookid` int(11) NOT NULL, + `operation` smallint(6) NOT NULL, + PRIMARY KEY (`id`), + KEY `addressbookid_synctoken` (`addressbookid`,`synctoken`) +) ENGINE=InnoDB AUTO_INCREMENT=2806 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_addressbooks` +-- + +DROP TABLE IF EXISTS `oc_addressbooks`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_addressbooks` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `principaluri` varchar(255) COLLATE utf8_bin DEFAULT NULL, + `displayname` varchar(255) COLLATE utf8_bin DEFAULT NULL, + `uri` varchar(255) COLLATE utf8_bin DEFAULT NULL, + `description` varchar(255) COLLATE utf8_bin DEFAULT NULL, + `synctoken` int(10) unsigned NOT NULL DEFAULT '1', + PRIMARY KEY (`id`), + UNIQUE KEY `addressbook_index` (`principaluri`,`uri`) +) ENGINE=InnoDB AUTO_INCREMENT=20697 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_appconfig` +-- + +DROP TABLE IF EXISTS `oc_appconfig`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_appconfig` ( + `appid` varchar(32) COLLATE utf8_bin NOT NULL DEFAULT '', + `configkey` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `configvalue` longtext COLLATE utf8_bin, + PRIMARY KEY (`appid`,`configkey`), + KEY `appconfig_config_key_index` (`configkey`), + KEY `appconfig_appid_key` (`appid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_authtoken` +-- + +DROP TABLE IF EXISTS `oc_authtoken`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_authtoken` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `uid` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `login_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `password` longtext COLLATE utf8_bin, + `name` longtext COLLATE utf8_bin NOT NULL, + `token` varchar(200) COLLATE utf8_bin NOT NULL DEFAULT '', + `type` smallint(5) unsigned NOT NULL DEFAULT '0', + `last_activity` int(10) unsigned NOT NULL DEFAULT '0', + `last_check` int(10) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `authtoken_token_index` (`token`), + KEY `authtoken_last_activity_index` (`last_activity`) +) ENGINE=InnoDB AUTO_INCREMENT=1116403 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_calendarchanges` +-- + +DROP TABLE IF EXISTS `oc_calendarchanges`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_calendarchanges` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `uri` varchar(255) COLLATE utf8_bin DEFAULT NULL, + `synctoken` int(10) unsigned NOT NULL DEFAULT '1', + `calendarid` int(11) NOT NULL, + `operation` smallint(6) NOT NULL, + PRIMARY KEY (`id`), + KEY `calendarid_synctoken` (`calendarid`,`synctoken`) +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_calendarobjects` +-- + +DROP TABLE IF EXISTS `oc_calendarobjects`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_calendarobjects` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `calendardata` longblob, + `uri` varchar(255) COLLATE utf8_bin DEFAULT NULL, + `calendarid` int(10) unsigned NOT NULL, + `lastmodified` int(10) unsigned DEFAULT NULL, + `etag` varchar(32) COLLATE utf8_bin DEFAULT NULL, + `size` bigint(20) unsigned NOT NULL, + `componenttype` varchar(8) COLLATE utf8_bin DEFAULT NULL, + `firstoccurence` bigint(20) unsigned DEFAULT NULL, + `lastoccurence` bigint(20) unsigned DEFAULT NULL, + `uid` varchar(255) COLLATE utf8_bin DEFAULT NULL, + `classification` int(11) DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `calobjects_index` (`calendarid`,`uri`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_calendars` +-- + +DROP TABLE IF EXISTS `oc_calendars`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_calendars` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `principaluri` varchar(255) COLLATE utf8_bin DEFAULT NULL, + `displayname` varchar(255) COLLATE utf8_bin DEFAULT NULL, + `uri` varchar(255) COLLATE utf8_bin DEFAULT NULL, + `synctoken` int(10) unsigned NOT NULL DEFAULT '1', + `description` varchar(255) COLLATE utf8_bin DEFAULT NULL, + `calendarorder` int(10) unsigned NOT NULL DEFAULT '0', + `calendarcolor` varchar(255) COLLATE utf8_bin DEFAULT NULL, + `timezone` longtext COLLATE utf8_bin, + `components` varchar(20) COLLATE utf8_bin DEFAULT NULL, + `transparent` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `calendars_index` (`principaluri`,`uri`) +) ENGINE=InnoDB AUTO_INCREMENT=20707 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_calendarsubscriptions` +-- + +DROP TABLE IF EXISTS `oc_calendarsubscriptions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_calendarsubscriptions` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `uri` varchar(255) COLLATE utf8_bin DEFAULT NULL, + `principaluri` varchar(255) COLLATE utf8_bin DEFAULT NULL, + `source` varchar(255) COLLATE utf8_bin DEFAULT NULL, + `displayname` varchar(100) COLLATE utf8_bin DEFAULT NULL, + `refreshrate` varchar(10) COLLATE utf8_bin DEFAULT NULL, + `calendarorder` int(10) unsigned NOT NULL DEFAULT '0', + `calendarcolor` varchar(255) COLLATE utf8_bin DEFAULT NULL, + `striptodos` smallint(6) DEFAULT NULL, + `stripalarms` smallint(6) DEFAULT NULL, + `stripattachments` smallint(6) DEFAULT NULL, + `lastmodified` int(10) unsigned NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `calsub_index` (`principaluri`,`uri`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_cards` +-- + +DROP TABLE IF EXISTS `oc_cards`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_cards` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `addressbookid` int(11) NOT NULL DEFAULT '0', + `carddata` longblob, + `uri` varchar(255) COLLATE utf8_bin DEFAULT NULL, + `lastmodified` bigint(20) unsigned DEFAULT NULL, + `etag` varchar(32) COLLATE utf8_bin DEFAULT NULL, + `size` bigint(20) unsigned NOT NULL, + PRIMARY KEY (`id`), + KEY `addressbookid_uri_index` (`addressbookid`,`uri`) +) ENGINE=InnoDB AUTO_INCREMENT=2780 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_cards_properties` +-- + +DROP TABLE IF EXISTS `oc_cards_properties`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_cards_properties` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `addressbookid` bigint(20) NOT NULL DEFAULT '0', + `cardid` bigint(20) unsigned NOT NULL DEFAULT '0', + `name` varchar(64) COLLATE utf8_bin DEFAULT NULL, + `value` varchar(255) COLLATE utf8_bin DEFAULT NULL, + `preferred` int(11) NOT NULL DEFAULT '1', + PRIMARY KEY (`id`), + KEY `card_value_index` (`value`), + KEY `card_name_index` (`name`), + KEY `card_contactid_index` (`cardid`) +) ENGINE=InnoDB AUTO_INCREMENT=11213 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_comments` +-- + +DROP TABLE IF EXISTS `oc_comments`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_comments` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `parent_id` int(10) unsigned NOT NULL DEFAULT '0', + `topmost_parent_id` int(10) unsigned NOT NULL DEFAULT '0', + `children_count` int(10) unsigned NOT NULL DEFAULT '0', + `actor_type` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `actor_id` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `message` longtext COLLATE utf8_bin, + `verb` varchar(64) COLLATE utf8_bin DEFAULT NULL, + `creation_timestamp` datetime DEFAULT NULL, + `latest_child_timestamp` datetime DEFAULT NULL, + `object_type` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `object_id` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', + PRIMARY KEY (`id`), + KEY `comments_parent_id_index` (`parent_id`), + KEY `comments_topmost_parent_id_idx` (`topmost_parent_id`), + KEY `comments_object_index` (`object_type`,`object_id`,`creation_timestamp`), + KEY `comments_actor_index` (`actor_type`,`actor_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_comments_read_markers` +-- + +DROP TABLE IF EXISTS `oc_comments_read_markers`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_comments_read_markers` ( + `user_id` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `marker_datetime` datetime DEFAULT NULL, + `object_type` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `object_id` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', + UNIQUE KEY `comments_marker_index` (`user_id`,`object_type`,`object_id`), + KEY `comments_marker_object_index` (`object_type`,`object_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_credentials` +-- + +DROP TABLE IF EXISTS `oc_credentials`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_credentials` ( + `user` varchar(64) COLLATE utf8_bin NOT NULL, + `identifier` varchar(64) COLLATE utf8_bin NOT NULL, + `credentials` longtext COLLATE utf8_bin, + PRIMARY KEY (`user`,`identifier`), + KEY `credentials_user` (`user`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_dav_properties` +-- + +DROP TABLE IF EXISTS `oc_dav_properties`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_dav_properties` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `propertypath` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '', + `propertyname` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '', + `propertyvalue` varchar(255) COLLATE utf8_bin NOT NULL, + PRIMARY KEY (`id`), + KEY `propertypath_index` (`propertypath`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_dav_shares` +-- + +DROP TABLE IF EXISTS `oc_dav_shares`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_dav_shares` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `principaluri` varchar(255) COLLATE utf8_bin DEFAULT NULL, + `type` varchar(255) COLLATE utf8_bin DEFAULT NULL, + `access` smallint(6) DEFAULT NULL, + `resourceid` int(10) unsigned NOT NULL, + `publicuri` varchar(255) COLLATE utf8_bin DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `dav_shares_index` (`principaluri`,`resourceid`,`type`,`publicuri`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_external_applicable` +-- + +DROP TABLE IF EXISTS `oc_external_applicable`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_external_applicable` ( + `applicable_id` bigint(20) NOT NULL AUTO_INCREMENT, + `mount_id` bigint(20) NOT NULL, + `type` int(11) NOT NULL, + `value` varchar(64) COLLATE utf8_bin DEFAULT NULL, + PRIMARY KEY (`applicable_id`), + UNIQUE KEY `applicable_type_value_mount` (`type`,`value`,`mount_id`), + KEY `applicable_mount` (`mount_id`), + KEY `applicable_type_value` (`type`,`value`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_external_config` +-- + +DROP TABLE IF EXISTS `oc_external_config`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_external_config` ( + `config_id` bigint(20) NOT NULL AUTO_INCREMENT, + `mount_id` bigint(20) NOT NULL, + `key` varchar(64) COLLATE utf8_bin NOT NULL, + `value` varchar(4096) COLLATE utf8_bin NOT NULL, + PRIMARY KEY (`config_id`), + UNIQUE KEY `config_mount_key` (`mount_id`,`key`), + KEY `config_mount` (`mount_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_external_mounts` +-- + +DROP TABLE IF EXISTS `oc_external_mounts`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_external_mounts` ( + `mount_id` bigint(20) NOT NULL AUTO_INCREMENT, + `mount_point` varchar(128) COLLATE utf8_bin NOT NULL, + `storage_backend` varchar(64) COLLATE utf8_bin NOT NULL, + `auth_backend` varchar(64) COLLATE utf8_bin NOT NULL, + `priority` int(11) NOT NULL DEFAULT '100', + `type` int(11) NOT NULL, + PRIMARY KEY (`mount_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_external_options` +-- + +DROP TABLE IF EXISTS `oc_external_options`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_external_options` ( + `option_id` bigint(20) NOT NULL AUTO_INCREMENT, + `mount_id` bigint(20) NOT NULL, + `key` varchar(64) COLLATE utf8_bin NOT NULL, + `value` varchar(256) COLLATE utf8_bin NOT NULL, + PRIMARY KEY (`option_id`), + UNIQUE KEY `option_mount_key` (`mount_id`,`key`), + KEY `option_mount` (`mount_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_federated_reshares` +-- + +DROP TABLE IF EXISTS `oc_federated_reshares`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_federated_reshares` ( + `share_id` bigint(20) NOT NULL, + `remote_id` bigint(20) NOT NULL COMMENT 'share ID at the remote server', + UNIQUE KEY `share_id_index` (`share_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_file_locks` +-- + +DROP TABLE IF EXISTS `oc_file_locks`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_file_locks` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `lock` int(11) NOT NULL DEFAULT '0', + `key` varchar(64) COLLATE utf8_bin NOT NULL, + `ttl` int(11) NOT NULL DEFAULT '-1', + PRIMARY KEY (`id`), + UNIQUE KEY `lock_key_index` (`key`), + KEY `lock_ttl_index` (`ttl`) +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_filecache` +-- + +DROP TABLE IF EXISTS `oc_filecache`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_filecache` ( + `fileid` bigint(20) NOT NULL AUTO_INCREMENT, + `storage` int(11) NOT NULL DEFAULT '0', + `path` varchar(4000) COLLATE utf8_bin DEFAULT NULL, + `path_hash` varchar(32) COLLATE utf8_bin NOT NULL DEFAULT '', + `parent` bigint(20) NOT NULL DEFAULT '0', + `name` varchar(250) COLLATE utf8_bin DEFAULT NULL, + `mimetype` int(11) NOT NULL DEFAULT '0', + `mimepart` int(11) NOT NULL DEFAULT '0', + `size` bigint(20) NOT NULL DEFAULT '0', + `mtime` bigint(20) NOT NULL DEFAULT '0', + `storage_mtime` bigint(20) NOT NULL DEFAULT '0', + `encrypted` int(11) NOT NULL DEFAULT '0', + `unencrypted_size` bigint(20) NOT NULL DEFAULT '0', + `etag` varchar(40) COLLATE utf8_bin DEFAULT NULL, + `permissions` int(11) DEFAULT '0', + `checksum` varchar(255) COLLATE utf8_bin DEFAULT NULL, + PRIMARY KEY (`fileid`), + UNIQUE KEY `fs_storage_path_hash` (`storage`,`path_hash`), + KEY `fs_parent_name_hash` (`parent`,`name`), + KEY `fs_storage_mimetype` (`storage`,`mimetype`), + KEY `fs_storage_mimepart` (`storage`,`mimepart`), + KEY `fs_storage_size` (`storage`,`size`,`fileid`) +) ENGINE=InnoDB AUTO_INCREMENT=5754 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_files_trash` +-- + +DROP TABLE IF EXISTS `oc_files_trash`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_files_trash` ( + `auto_id` bigint(20) NOT NULL AUTO_INCREMENT, + `id` varchar(250) COLLATE utf8_bin NOT NULL DEFAULT '', + `user` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `timestamp` varchar(12) COLLATE utf8_bin NOT NULL DEFAULT '', + `location` varchar(512) COLLATE utf8_bin NOT NULL DEFAULT '', + `type` varchar(4) COLLATE utf8_bin DEFAULT NULL, + `mime` varchar(255) COLLATE utf8_bin DEFAULT NULL, + PRIMARY KEY (`auto_id`), + KEY `id_index` (`id`), + KEY `timestamp_index` (`timestamp`), + KEY `user_index` (`user`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_group_admin` +-- + +DROP TABLE IF EXISTS `oc_group_admin`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_group_admin` ( + `gid` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `uid` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', + PRIMARY KEY (`gid`,`uid`), + KEY `group_admin_uid` (`uid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_group_user` +-- + +DROP TABLE IF EXISTS `oc_group_user`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_group_user` ( + `gid` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `uid` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', + PRIMARY KEY (`gid`,`uid`), + KEY `gu_uid_index` (`uid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_groups` +-- + +DROP TABLE IF EXISTS `oc_groups`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_groups` ( + `gid` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', + PRIMARY KEY (`gid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_jobs` +-- + +DROP TABLE IF EXISTS `oc_jobs`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_jobs` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `class` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '', + `argument` varchar(4000) COLLATE utf8_bin NOT NULL DEFAULT '', + `last_run` int(11) DEFAULT '0', + `last_checked` int(11) DEFAULT '0', + `reserved_at` int(11) DEFAULT '0', + `execution_duration` int(11) NOT NULL DEFAULT '-1', + PRIMARY KEY (`id`), + KEY `job_class_index` (`class`) +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_migrations` +-- + +DROP TABLE IF EXISTS `oc_migrations`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_migrations` ( + `app` varchar(177) COLLATE utf8_bin NOT NULL, + `version` varchar(14) COLLATE utf8_bin NOT NULL, + PRIMARY KEY (`app`,`version`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_mimetypes` +-- + +DROP TABLE IF EXISTS `oc_mimetypes`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_mimetypes` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `mimetype` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '', + PRIMARY KEY (`id`), + UNIQUE KEY `mimetype_id_index` (`mimetype`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_mounts` +-- + +DROP TABLE IF EXISTS `oc_mounts`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_mounts` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `storage_id` int(11) NOT NULL, + `root_id` bigint(20) NOT NULL, + `user_id` varchar(64) COLLATE utf8_bin NOT NULL, + `mount_point` varchar(4000) COLLATE utf8_bin NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `mounts_user_root_index` (`user_id`,`root_id`), + KEY `mounts_user_index` (`user_id`), + KEY `mounts_storage_index` (`storage_id`), + KEY `mounts_root_index` (`root_id`) +) ENGINE=InnoDB AUTO_INCREMENT=20956 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_preferences` +-- + +DROP TABLE IF EXISTS `oc_preferences`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_preferences` ( + `userid` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `appid` varchar(32) COLLATE utf8_bin NOT NULL DEFAULT '', + `configkey` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `configvalue` longtext COLLATE utf8_bin, + PRIMARY KEY (`userid`,`appid`,`configkey`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_privatedata` +-- + +DROP TABLE IF EXISTS `oc_privatedata`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_privatedata` ( + `keyid` int(10) unsigned NOT NULL AUTO_INCREMENT, + `user` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `app` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '', + `key` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '', + `value` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '', + PRIMARY KEY (`keyid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_properties` +-- + +DROP TABLE IF EXISTS `oc_properties`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_properties` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `fileid` bigint(20) unsigned DEFAULT NULL, + `propertyname` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '', + `propertyvalue` varchar(255) COLLATE utf8_bin NOT NULL, + PRIMARY KEY (`id`), + KEY `fileid_index` (`fileid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_schedulingobjects` +-- + +DROP TABLE IF EXISTS `oc_schedulingobjects`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_schedulingobjects` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `principaluri` varchar(255) COLLATE utf8_bin DEFAULT NULL, + `calendardata` longblob, + `uri` varchar(255) COLLATE utf8_bin DEFAULT NULL, + `lastmodified` int(10) unsigned DEFAULT NULL, + `etag` varchar(32) COLLATE utf8_bin DEFAULT NULL, + `size` bigint(20) unsigned NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_sciencemesh` +-- + +DROP TABLE IF EXISTS `oc_sciencemesh`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_sciencemesh` ( + `iopurl` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT 'http://localhost:10999', + `country` varchar(2) COLLATE utf8_bin NOT NULL, + `hostname` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT 'example.org', + `sitename` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT 'CERNBox', + `siteurl` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT 'http://localhost', + `numusers` bigint(20) unsigned DEFAULT '0', + `numfiles` bigint(20) unsigned DEFAULT '0', + `numstorage` bigint(20) unsigned DEFAULT '0' +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_share` +-- + +DROP TABLE IF EXISTS `oc_share`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_share` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `share_type` smallint(6) NOT NULL DEFAULT '0', + `share_with` varchar(255) COLLATE utf8_bin DEFAULT NULL, + `uid_owner` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `uid_initiator` varchar(64) COLLATE utf8_bin DEFAULT NULL, + `parent` int(11) DEFAULT NULL, + `item_type` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `item_source` varchar(255) COLLATE utf8_bin DEFAULT NULL, + `item_target` varchar(255) COLLATE utf8_bin DEFAULT NULL, + `file_source` bigint(20) unsigned DEFAULT NULL, + `file_target` varchar(512) COLLATE utf8_bin DEFAULT NULL, + `permissions` smallint(6) NOT NULL DEFAULT '0', + `stime` bigint(20) NOT NULL DEFAULT '0', + `accepted` smallint(6) NOT NULL DEFAULT '0', + `expiration` datetime DEFAULT NULL, + `token` varchar(32) COLLATE utf8_bin DEFAULT NULL, + `mail_send` smallint(6) NOT NULL DEFAULT '0', + `fileid_prefix` varchar(255) COLLATE utf8_bin DEFAULT NULL, + `orphan` tinyint(4) DEFAULT NULL, + `share_name` varchar(255) COLLATE utf8_bin DEFAULT NULL, + `quicklink` tinyint(1) NOT NULL DEFAULT '0', + `description` varchar(1024) COLLATE utf8_bin NOT NULL DEFAULT '', + `internal` tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `item_share_type_index` (`item_type`,`share_type`), + KEY `file_source_index` (`file_source`), + KEY `token_index` (`token`), + KEY `index_internal` (`internal`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=336217 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_share_acl` +-- + +DROP TABLE IF EXISTS `oc_share_acl`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_share_acl` ( + `id` int(11) NOT NULL, + `rejected_by` varchar(255) NOT NULL, + PRIMARY KEY (`id`,`rejected_by`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_share_acl_old` +-- + +DROP TABLE IF EXISTS `oc_share_acl_old`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_share_acl_old` ( + `id` int(11) NOT NULL, + `rejected_by` varchar(255) NOT NULL, + KEY `id` (`id`), + CONSTRAINT `oc_share_acl_old_ibfk_1` FOREIGN KEY (`id`) REFERENCES `oc_share` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_share_copy` +-- + +DROP TABLE IF EXISTS `oc_share_copy`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_share_copy` ( + `id` int(11) NOT NULL DEFAULT '0', + `share_type` smallint(6) NOT NULL DEFAULT '0', + `share_with` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `uid_owner` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `uid_initiator` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `parent` int(11) DEFAULT NULL, + `item_type` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `item_source` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `item_target` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `file_source` bigint(20) unsigned DEFAULT NULL, + `file_target` varchar(512) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `permissions` smallint(6) NOT NULL DEFAULT '0', + `stime` bigint(20) NOT NULL DEFAULT '0', + `accepted` smallint(6) NOT NULL DEFAULT '0', + `expiration` datetime DEFAULT NULL, + `token` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `mail_send` smallint(6) NOT NULL DEFAULT '0', + `fileid_prefix` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `orphan` tinyint(4) DEFAULT NULL, + `share_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_share_external` +-- + +DROP TABLE IF EXISTS `oc_share_external`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_share_external` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `remote` varchar(512) COLLATE utf8_bin NOT NULL COMMENT 'Url of the remote owncloud instance', + `remote_id` bigint(20) NOT NULL DEFAULT '-1', + `share_token` varchar(64) COLLATE utf8_bin NOT NULL COMMENT 'Public share token', + `password` varchar(64) COLLATE utf8_bin DEFAULT NULL COMMENT 'Optional password for the public share', + `name` varchar(64) COLLATE utf8_bin NOT NULL COMMENT 'Original name on the remote server', + `owner` varchar(64) COLLATE utf8_bin NOT NULL COMMENT 'User that owns the public share on the remote server', + `user` varchar(64) COLLATE utf8_bin NOT NULL COMMENT 'Local user which added the external share', + `mountpoint` varchar(4000) COLLATE utf8_bin NOT NULL COMMENT 'Full path where the share is mounted', + `mountpoint_hash` varchar(32) COLLATE utf8_bin NOT NULL COMMENT 'md5 hash of the mountpoint', + `accepted` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `sh_external_mp` (`user`,`mountpoint_hash`), + KEY `sh_external_user` (`user`) +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_share_status` +-- + +DROP TABLE IF EXISTS `oc_share_status`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_share_status` ( + `id` int(11) NOT NULL, + `recipient` varchar(255) NOT NULL, + `state` int(11) DEFAULT '0', + PRIMARY KEY (`id`,`recipient`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_storages` +-- + +DROP TABLE IF EXISTS `oc_storages`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_storages` ( + `id` varchar(64) COLLATE utf8_bin DEFAULT NULL, + `numeric_id` int(11) NOT NULL AUTO_INCREMENT, + `available` int(11) NOT NULL DEFAULT '1', + `last_checked` int(11) DEFAULT NULL, + PRIMARY KEY (`numeric_id`), + UNIQUE KEY `storages_id_index` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_systemtag` +-- + +DROP TABLE IF EXISTS `oc_systemtag`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_systemtag` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `visibility` smallint(6) NOT NULL DEFAULT '1', + `editable` smallint(6) NOT NULL DEFAULT '1', + PRIMARY KEY (`id`), + UNIQUE KEY `tag_ident` (`name`,`visibility`,`editable`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_systemtag_group` +-- + +DROP TABLE IF EXISTS `oc_systemtag_group`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_systemtag_group` ( + `systemtagid` int(10) unsigned NOT NULL DEFAULT '0', + `gid` varchar(255) COLLATE utf8_bin NOT NULL, + PRIMARY KEY (`gid`,`systemtagid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_systemtag_object_mapping` +-- + +DROP TABLE IF EXISTS `oc_systemtag_object_mapping`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_systemtag_object_mapping` ( + `objectid` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `objecttype` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `systemtagid` int(10) unsigned NOT NULL DEFAULT '0', + UNIQUE KEY `mapping` (`objecttype`,`objectid`,`systemtagid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_trusted_servers` +-- + +DROP TABLE IF EXISTS `oc_trusted_servers`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_trusted_servers` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `url` varchar(512) COLLATE utf8_bin NOT NULL COMMENT 'Url of trusted server', + `url_hash` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT 'sha1 hash of the url without the protocol', + `token` varchar(128) COLLATE utf8_bin DEFAULT NULL COMMENT 'token used to exchange the shared secret', + `shared_secret` varchar(256) COLLATE utf8_bin DEFAULT NULL COMMENT 'shared secret used to authenticate', + `status` int(11) NOT NULL DEFAULT '2' COMMENT 'current status of the connection', + `sync_token` varchar(512) COLLATE utf8_bin DEFAULT NULL COMMENT 'cardDav sync token', + PRIMARY KEY (`id`), + UNIQUE KEY `url_hash` (`url_hash`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_users` +-- + +DROP TABLE IF EXISTS `oc_users`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_users` ( + `uid` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `displayname` varchar(64) COLLATE utf8_bin DEFAULT NULL, + `password` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '', + PRIMARY KEY (`uid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_vcategory` +-- + +DROP TABLE IF EXISTS `oc_vcategory`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_vcategory` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `uid` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `type` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `category` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '', + PRIMARY KEY (`id`), + KEY `uid_index` (`uid`), + KEY `type_index` (`type`), + KEY `category_index` (`category`) +) ENGINE=InnoDB AUTO_INCREMENT=1925 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_vcategory_to_object` +-- + +DROP TABLE IF EXISTS `oc_vcategory_to_object`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_vcategory_to_object` ( + `objid` int(10) unsigned NOT NULL DEFAULT '0', + `categoryid` int(10) unsigned NOT NULL DEFAULT '0', + `type` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', + PRIMARY KEY (`categoryid`,`objid`,`type`), + KEY `vcategory_objectd_index` (`objid`,`type`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `test_ocshare` +-- + +DROP TABLE IF EXISTS `test_ocshare`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `test_ocshare` ( + `id` int(11) NOT NULL DEFAULT '0', + `share_type` smallint(6) NOT NULL DEFAULT '0', + `share_with` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `uid_owner` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `uid_initiator` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `parent` int(11) DEFAULT NULL, + `item_type` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `item_source` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `item_target` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `file_source` bigint(20) unsigned DEFAULT NULL, + `permissions` smallint(6) NOT NULL DEFAULT '0', + `stime` bigint(20) NOT NULL DEFAULT '0', + `accepted` smallint(6) NOT NULL DEFAULT '0', + `expiration` datetime DEFAULT NULL, + `token` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `mail_send` smallint(6) NOT NULL DEFAULT '0', + `fileid_prefix` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `orphan` tinyint(4) DEFAULT NULL, + `share_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2023-07-06 16:41:58 diff --git a/db/setup_notifications.sql b/db/setup_notifications.sql new file mode 100644 index 0000000000..234c2a2558 --- /dev/null +++ b/db/setup_notifications.sql @@ -0,0 +1,53 @@ +-- Copyright 2018-2023 CERN +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- +-- In applying this license, CERN does not waive the privileges and immunities +-- granted to it by virtue of its status as an Intergovernmental Organization +-- or submit itself to any jurisdiction. + +-- This file can be used to make the required changes to the MySQL DB. This is +-- not a proper migration but it should work on most situations. + +CREATE TABLE `notifications` ( + `id` INT PRIMARY KEY AUTO_INCREMENT, + `ref` VARCHAR(3072) UNIQUE NOT NULL, + `template_name` VARCHAR(320) NOT NULL +); + +COMMIT; + +CREATE TABLE `notification_recipients` ( + `id` INT PRIMARY KEY AUTO_INCREMENT, + `notification_id` INT NOT NULL, + `recipient` VARCHAR(320) NOT NULL, + FOREIGN KEY (notification_id) + REFERENCES notifications (id) + ON DELETE CASCADE +); + +COMMIT; + +CREATE INDEX `notifications_ix0` ON `notifications` (`ref`); + +CREATE INDEX `notification_recipients_ix0` ON `notification_recipients` (`notification_id`); +CREATE INDEX `notification_recipients_ix1` ON `notification_recipients` (`recipient`); + +-- changes for added notifications on oc shares + +ALTER TABLE oc_share ADD notify_uploads BOOL DEFAULT false; +ALTER TABLE oc_share ADD notify_uploads_extra_recipients VARCHAR(2048); + +UPDATE oc_share SET notify_uploads = false; + +ALTER TABLE oc_share MODIFY notify_uploads BOOL DEFAULT false NOT NULL; diff --git a/db/setup_ocm.sql b/db/setup_ocm.sql new file mode 100644 index 0000000000..785439ff1e --- /dev/null +++ b/db/setup_ocm.sql @@ -0,0 +1,83 @@ +CREATE TABLE IF NOT EXISTS ocm_shares ( + id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, + token VARCHAR(255) NOT NULL UNIQUE, + fileid_prefix VARCHAR(64) NOT NULL, + item_source VARCHAR(64) NOT NULL, + name TEXT NOT NULL, + share_with VARCHAR(255) NOT NULL, + owner VARCHAR(255) NOT NULL, + initiator TEXT NOT NULL, + ctime INTEGER NOT NULL, + mtime INTEGER NOT NULL, + expiration INTEGER DEFAULT NULL, + type TINYINT NOT NULL, + UNIQUE(fileid_prefix, item_source, share_with, owner) +); + +CREATE TABLE IF NOT EXISTS ocm_shares_access_methods ( + id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT, + ocm_share_id INTEGER NOT NULL, + type TINYINT NOT NULL, + FOREIGN KEY (ocm_share_id) REFERENCES ocm_shares(id) ON DELETE CASCADE, + UNIQUE (ocm_share_id, type) +); + +CREATE TABLE IF NOT EXISTS ocm_access_method_webdav ( + ocm_access_method_id INTEGER NOT NULL PRIMARY KEY, + permissions INTEGER NOT NULL, + FOREIGN KEY (ocm_access_method_id) REFERENCES ocm_shares_access_methods(id) ON DELETE CASCADE +); + +CREATE TABLE IF NOT EXISTS ocm_access_method_webapp ( + ocm_access_method_id INTEGER NOT NULL PRIMARY KEY, + view_mode INTEGER NOT NULL, + FOREIGN KEY (ocm_access_method_id) REFERENCES ocm_shares_access_methods(id) ON DELETE CASCADE +); + + +CREATE TABLE IF NOT EXISTS ocm_received_shares ( + id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT, + name VARCHAR(255) NOT NULL, + fileid_prefix VARCHAR(255) NOT NULL, + item_source VARCHAR(255) NOT NULL, + item_type TINYINT NOT NULL, + share_with VARCHAR(255) NOT NULL, + owner VARCHAR(255) NOT NULL, + initiator VARCHAR(255) NOT NULL, + ctime INTEGER NOT NULL, + mtime INTEGER NOT NULL, + expiration INTEGER DEFAULT NULL, + type TINYINT NOT NULL, + state TINYINT NOT NULL +); + +CREATE TABLE IF NOT EXISTS ocm_received_share_protocols ( + id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT, + ocm_received_share_id INTEGER NOT NULL, + type TINYINT NOT NULL, + FOREIGN KEY (ocm_received_share_id) REFERENCES ocm_received_shares(id) ON DELETE CASCADE, + UNIQUE (ocm_received_share_id, type) +); + +CREATE TABLE IF NOT EXISTS ocm_protocol_webdav ( + ocm_protocol_id INTEGER NOT NULL PRIMARY KEY, + uri VARCHAR(255) NOT NULL, + shared_secret TEXT NOT NULL, + permissions INTEGER NOT NULL, + FOREIGN KEY (ocm_protocol_id) REFERENCES ocm_received_share_protocols(id) ON DELETE CASCADE +); + +CREATE TABLE IF NOT EXISTS ocm_protocol_webapp ( + ocm_protocol_id INTEGER NOT NULL PRIMARY KEY, + uri_template VARCHAR(255) NOT NULL, + view_mode INTEGER NOT NULL, + FOREIGN KEY (ocm_protocol_id) REFERENCES ocm_received_share_protocols(id) ON DELETE CASCADE +); + +CREATE TABLE IF NOT EXISTS ocm_protocol_transfer ( + ocm_protocol_id INTEGER NOT NULL PRIMARY KEY, + source_uri VARCHAR(255) NOT NULL, + shared_secret VARCHAR(255) NOT NULL, + size INTEGER NOT NULL, + FOREIGN KEY (ocm_protocol_id) REFERENCES ocm_received_share_protocols(id) ON DELETE CASCADE +); From 694bf10721f9970a6b4ed8fddba6721a6b0a9d57 Mon Sep 17 00:00:00 2001 From: Giuseppe Lo Presti Date: Fri, 7 Jul 2023 08:47:49 +0200 Subject: [PATCH 2/5] Created scripts to remove legacy tables --- db/drop_oc_unused_tables.sql | 48 ++++++++++++++++++++++++++++++++++ db/drop_old_cernbox_tables.sql | 2 ++ 2 files changed, 50 insertions(+) create mode 100644 db/drop_oc_unused_tables.sql create mode 100644 db/drop_old_cernbox_tables.sql diff --git a/db/drop_oc_unused_tables.sql b/db/drop_oc_unused_tables.sql new file mode 100644 index 0000000000..782fcee6b0 --- /dev/null +++ b/db/drop_oc_unused_tables.sql @@ -0,0 +1,48 @@ +DROP TABLE IF EXISTS `oc_account_terms`; +DROP TABLE IF EXISTS `oc_addressbookchanges`; +DROP TABLE IF EXISTS `oc_appconfig`; +DROP TABLE IF EXISTS `oc_authtoken`; +DROP TABLE IF EXISTS `oc_calendarchanges`; +DROP TABLE IF EXISTS `oc_calendarobjects`; +DROP TABLE IF EXISTS `oc_calendars`; +DROP TABLE IF EXISTS `oc_calendarsubscriptions`; +DROP TABLE IF EXISTS `oc_cards`; +DROP TABLE IF EXISTS `oc_cards_properties`; +DROP TABLE IF EXISTS `oc_comments`; +DROP TABLE IF EXISTS `oc_comments_read_markers`; +DROP TABLE IF EXISTS `oc_credentials`; +DROP TABLE IF EXISTS `oc_dav_properties`; +DROP TABLE IF EXISTS `oc_dav_shares`; +DROP TABLE IF EXISTS `oc_external_applicable`; +DROP TABLE IF EXISTS `oc_external_config`; +DROP TABLE IF EXISTS `oc_external_mounts`; +DROP TABLE IF EXISTS `oc_external_options`; +DROP TABLE IF EXISTS `oc_federated_reshares`; +DROP TABLE IF EXISTS `oc_file_locks`; +DROP TABLE IF EXISTS `oc_filecache`; +DROP TABLE IF EXISTS `oc_files_trash`; +DROP TABLE IF EXISTS `oc_group_admin`; +DROP TABLE IF EXISTS `oc_group_user`; +DROP TABLE IF EXISTS `oc_groups`; +DROP TABLE IF EXISTS `oc_jobs`; +DROP TABLE IF EXISTS `oc_migrations`; +DROP TABLE IF EXISTS `oc_mimetypes`; +DROP TABLE IF EXISTS `oc_privatedata`; +DROP TABLE IF EXISTS `oc_properties`; +DROP TABLE IF EXISTS `oc_schedulingobjects`; +DROP TABLE IF EXISTS `oc_storages`; +DROP TABLE IF EXISTS `oc_systemtag`; +DROP TABLE IF EXISTS `oc_systemtag_group`; +DROP TABLE IF EXISTS `oc_systemtag_object_mapping`; +DROP TABLE IF EXISTS `oc_trusted_servers`; +DROP TABLE IF EXISTS `oc_users`; +DROP TABLE IF EXISTS `oc_vcategory`; +DROP TABLE IF EXISTS `oc_vcategory_to_object`; +DROP TABLE IF EXISTS `oc_share_copy`; +DROP TABLE IF EXISTS `oc_share_external`; +DROP TABLE IF EXISTS `test_ocshare`; +DROP TABLE IF EXISTS `oc_share_acl`; +DROP TABLE IF EXISTS `oc_share_acl_old`; +DROP TABLE IF EXISTS `oc_accounts`; +DROP TABLE IF EXISTS `oc_addressbooks`; +DROP TABLE IF EXISTS `oc_mounts`; diff --git a/db/drop_old_cernbox_tables.sql b/db/drop_old_cernbox_tables.sql new file mode 100644 index 0000000000..0ea723534b --- /dev/null +++ b/db/drop_old_cernbox_tables.sql @@ -0,0 +1,2 @@ +DROP TABLE IF EXISTS `cbox_canary`; +DROP TABLE IF EXISTS `cbox_office_engine`; From 6aa9f2de265f599995d180b0a3703de14e715348 Mon Sep 17 00:00:00 2001 From: Giuseppe Lo Presti Date: Wed, 12 Jul 2023 16:01:24 +0200 Subject: [PATCH 3/5] Fixed notifications script --- db/setup_notifications.sql | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/db/setup_notifications.sql b/db/setup_notifications.sql index 234c2a2558..8b2ccc804d 100644 --- a/db/setup_notifications.sql +++ b/db/setup_notifications.sql @@ -45,9 +45,5 @@ CREATE INDEX `notification_recipients_ix1` ON `notification_recipients` (`recipi -- changes for added notifications on oc shares -ALTER TABLE oc_share ADD notify_uploads BOOL DEFAULT false; +ALTER TABLE oc_share ADD notify_uploads BOOL DEFAULT false NOT NULL; ALTER TABLE oc_share ADD notify_uploads_extra_recipients VARCHAR(2048); - -UPDATE oc_share SET notify_uploads = false; - -ALTER TABLE oc_share MODIFY notify_uploads BOOL DEFAULT false NOT NULL; From fec344049bed3418a986fe5274ae73d6bf7c43b7 Mon Sep 17 00:00:00 2001 From: Giuseppe Lo Presti Date: Wed, 12 Jul 2023 16:01:39 +0200 Subject: [PATCH 4/5] Added up-to-date init script and updated readme --- db/README.md | 7 + db/init.sql | 399 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 406 insertions(+) create mode 100644 db/init.sql diff --git a/db/README.md b/db/README.md index 92cfde4757..06f004ca4e 100644 --- a/db/README.md +++ b/db/README.md @@ -47,3 +47,10 @@ The following table was populated by hand and it is not used by Reva: * oc_sciencemesh +The scripts in this folder include: +* An `init.sql` script to create a database schema from scratch that works with latest Reva. + +Furthermore, for historical record: +* An `owncloud_db_dump.sql` script to represent the current state of the DB as of July 2023. +* Some `setup_*.sql` scripts to add schema features as they are developed and published. +* Some `drop_*.sql` scripts to clean up a production schema that was used with former legacy systems. diff --git a/db/init.sql b/db/init.sql new file mode 100644 index 0000000000..2f5e67fc70 --- /dev/null +++ b/db/init.sql @@ -0,0 +1,399 @@ +-- +-- SQL script to create the database structure used by Reva from scratch +-- +-- The script was obtained by dumping the CERNBox production database +-- and keeping the tables effectively referenced in the Reva code base + +-- MySQL dump 10.14 Distrib 5.5.68-MariaDB, for Linux (x86_64) +-- +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `cbox_metadata` +-- + +DROP TABLE IF EXISTS `cbox_metadata`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `cbox_metadata` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `item_type` int(11) NOT NULL, + `uid` varchar(64) NOT NULL, + `fileid_prefix` varchar(255) NOT NULL, + `fileid` varchar(255) NOT NULL, + `tag_key` varchar(255) NOT NULL, + `tag_val` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=11623 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `cbox_otg_ocis` +-- + +DROP TABLE IF EXISTS `cbox_otg_ocis`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `cbox_otg_ocis` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `message` text NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `cernbox_project_mapping` +-- + +DROP TABLE IF EXISTS `cernbox_project_mapping`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `cernbox_project_mapping` ( + `project_name` varchar(50) NOT NULL, + `eos_relative_path` varchar(50) NOT NULL, + `project_owner` varchar(50) NOT NULL DEFAULT 'temp', + PRIMARY KEY (`project_name`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `notification_recipients` +-- + +DROP TABLE IF EXISTS `notification_recipients`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `notification_recipients` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `notification_id` int(11) NOT NULL, + `recipient` varchar(320) NOT NULL, + PRIMARY KEY (`id`), + KEY `notification_recipients_ix0` (`notification_id`), + KEY `notification_recipients_ix1` (`recipient`), + CONSTRAINT `notification_recipients_ibfk_1` FOREIGN KEY (`notification_id`) REFERENCES `notifications` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `notifications` +-- + +DROP TABLE IF EXISTS `notifications`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `notifications` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `ref` varchar(3072) NOT NULL, + `template_name` varchar(320) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `ref` (`ref`), + KEY `notifications_ix0` (`ref`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_preferences` +-- + +DROP TABLE IF EXISTS `oc_preferences`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_preferences` ( + `userid` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `appid` varchar(32) COLLATE utf8_bin NOT NULL DEFAULT '', + `configkey` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `configvalue` longtext COLLATE utf8_bin, + PRIMARY KEY (`userid`,`appid`,`configkey`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_sciencemesh` +-- + +DROP TABLE IF EXISTS `oc_sciencemesh`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_sciencemesh` ( + `iopurl` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT 'http://localhost:10999', + `country` varchar(2) COLLATE utf8_bin NOT NULL, + `hostname` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT 'example.org', + `sitename` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT 'CERNBox', + `siteurl` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT 'http://localhost', + `numusers` bigint(20) unsigned DEFAULT '0', + `numfiles` bigint(20) unsigned DEFAULT '0', + `numstorage` bigint(20) unsigned DEFAULT '0' +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_share` +-- + +DROP TABLE IF EXISTS `oc_share`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_share` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `share_type` smallint(6) NOT NULL DEFAULT '0', + `share_with` varchar(255) COLLATE utf8_bin DEFAULT NULL, + `uid_owner` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `uid_initiator` varchar(64) COLLATE utf8_bin DEFAULT NULL, + `parent` int(11) DEFAULT NULL, + `item_type` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `item_source` varchar(255) COLLATE utf8_bin DEFAULT NULL, + `item_target` varchar(255) COLLATE utf8_bin DEFAULT NULL, + `file_source` bigint(20) unsigned DEFAULT NULL, + `file_target` varchar(512) COLLATE utf8_bin DEFAULT NULL, + `permissions` smallint(6) NOT NULL DEFAULT '0', + `stime` bigint(20) NOT NULL DEFAULT '0', + `accepted` smallint(6) NOT NULL DEFAULT '0', + `expiration` datetime DEFAULT NULL, + `token` varchar(32) COLLATE utf8_bin DEFAULT NULL, + `mail_send` smallint(6) NOT NULL DEFAULT '0', + `fileid_prefix` varchar(255) COLLATE utf8_bin DEFAULT NULL, + `orphan` tinyint(4) DEFAULT NULL, + `share_name` varchar(255) COLLATE utf8_bin DEFAULT NULL, + `quicklink` tinyint(1) NOT NULL DEFAULT '0', + `description` varchar(1024) COLLATE utf8_bin NOT NULL DEFAULT '', + `internal` tinyint(1) NOT NULL DEFAULT '0', + `notify_uploads_extra_recipients` varchar(2048) COLLATE utf8_bin DEFAULT NULL, + `notify_uploads` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `item_share_type_index` (`item_type`,`share_type`), + KEY `file_source_index` (`file_source`), + KEY `token_index` (`token`), + KEY `index_internal` (`internal`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=336200 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `oc_share_status` +-- + +DROP TABLE IF EXISTS `oc_share_status`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oc_share_status` ( + `id` int(11) NOT NULL, + `recipient` varchar(255) NOT NULL, + `state` int(11) DEFAULT '0', + PRIMARY KEY (`id`,`recipient`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `ocm_access_method_webapp` +-- + +DROP TABLE IF EXISTS `ocm_access_method_webapp`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ocm_access_method_webapp` ( + `ocm_access_method_id` int(11) NOT NULL, + `view_mode` int(11) NOT NULL, + PRIMARY KEY (`ocm_access_method_id`), + CONSTRAINT `ocm_access_method_webapp_ibfk_1` FOREIGN KEY (`ocm_access_method_id`) REFERENCES `ocm_shares_access_methods` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `ocm_access_method_webdav` +-- + +DROP TABLE IF EXISTS `ocm_access_method_webdav`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ocm_access_method_webdav` ( + `ocm_access_method_id` int(11) NOT NULL, + `permissions` int(11) NOT NULL, + PRIMARY KEY (`ocm_access_method_id`), + CONSTRAINT `ocm_access_method_webdav_ibfk_1` FOREIGN KEY (`ocm_access_method_id`) REFERENCES `ocm_shares_access_methods` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `ocm_protocol_transfer` +-- + +DROP TABLE IF EXISTS `ocm_protocol_transfer`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ocm_protocol_transfer` ( + `ocm_protocol_id` int(11) NOT NULL, + `source_uri` varchar(255) NOT NULL, + `shared_secret` varchar(255) NOT NULL, + `size` int(11) NOT NULL, + PRIMARY KEY (`ocm_protocol_id`), + CONSTRAINT `ocm_protocol_transfer_ibfk_1` FOREIGN KEY (`ocm_protocol_id`) REFERENCES `ocm_received_share_protocols` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `ocm_protocol_webapp` +-- + +DROP TABLE IF EXISTS `ocm_protocol_webapp`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ocm_protocol_webapp` ( + `ocm_protocol_id` int(11) NOT NULL, + `uri_template` varchar(255) NOT NULL, + `view_mode` int(11) NOT NULL, + PRIMARY KEY (`ocm_protocol_id`), + CONSTRAINT `ocm_protocol_webapp_ibfk_1` FOREIGN KEY (`ocm_protocol_id`) REFERENCES `ocm_received_share_protocols` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `ocm_protocol_webdav` +-- + +DROP TABLE IF EXISTS `ocm_protocol_webdav`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ocm_protocol_webdav` ( + `ocm_protocol_id` int(11) NOT NULL, + `uri` varchar(255) NOT NULL, + `shared_secret` text NOT NULL, + `permissions` int(11) NOT NULL, + PRIMARY KEY (`ocm_protocol_id`), + CONSTRAINT `ocm_protocol_webdav_ibfk_1` FOREIGN KEY (`ocm_protocol_id`) REFERENCES `ocm_received_share_protocols` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `ocm_received_share_protocols` +-- + +DROP TABLE IF EXISTS `ocm_received_share_protocols`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ocm_received_share_protocols` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `ocm_received_share_id` int(11) NOT NULL, + `type` tinyint(4) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `ocm_received_share_id` (`ocm_received_share_id`,`type`), + CONSTRAINT `ocm_received_share_protocols_ibfk_1` FOREIGN KEY (`ocm_received_share_id`) REFERENCES `ocm_received_shares` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=210 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `ocm_received_shares` +-- + +DROP TABLE IF EXISTS `ocm_received_shares`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ocm_received_shares` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `item_type` tinyint(4) NOT NULL, + `share_with` varchar(255) NOT NULL, + `owner` varchar(255) NOT NULL, + `initiator` varchar(255) NOT NULL, + `ctime` int(11) NOT NULL, + `mtime` int(11) NOT NULL, + `expiration` int(11) DEFAULT NULL, + `type` tinyint(4) NOT NULL, + `state` tinyint(4) NOT NULL, + `remote_share_id` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=136 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `ocm_remote_users` +-- + +DROP TABLE IF EXISTS `ocm_remote_users`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ocm_remote_users` ( + `initiator` varchar(255) NOT NULL, + `opaque_user_id` varchar(255) NOT NULL, + `idp` varchar(255) NOT NULL, + `email` varchar(255) NOT NULL, + `display_name` varchar(255) NOT NULL, + PRIMARY KEY (`initiator`,`opaque_user_id`,`idp`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `ocm_shares` +-- + +DROP TABLE IF EXISTS `ocm_shares`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ocm_shares` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `token` varchar(255) NOT NULL, + `fileid_prefix` varchar(64) NOT NULL, + `item_source` varchar(64) NOT NULL, + `name` text NOT NULL, + `share_with` varchar(255) NOT NULL, + `owner` varchar(255) NOT NULL, + `initiator` text NOT NULL, + `ctime` int(11) NOT NULL, + `mtime` int(11) NOT NULL, + `expiration` int(11) DEFAULT NULL, + `type` tinyint(4) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `token` (`token`), + UNIQUE KEY `fileid_prefix` (`fileid_prefix`,`item_source`,`share_with`,`owner`) +) ENGINE=InnoDB AUTO_INCREMENT=192 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `ocm_shares_access_methods` +-- + +DROP TABLE IF EXISTS `ocm_shares_access_methods`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ocm_shares_access_methods` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `ocm_share_id` int(11) NOT NULL, + `type` tinyint(4) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `ocm_share_id` (`ocm_share_id`,`type`), + CONSTRAINT `ocm_shares_access_methods_ibfk_1` FOREIGN KEY (`ocm_share_id`) REFERENCES `ocm_shares` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=333 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `ocm_tokens` +-- + +DROP TABLE IF EXISTS `ocm_tokens`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ocm_tokens` ( + `token` varchar(255) NOT NULL, + `initiator` varchar(255) NOT NULL, + `expiration` datetime NOT NULL, + `description` varchar(255) DEFAULT NULL, + PRIMARY KEY (`token`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + From d1ef25b7e2cccfff35f6d3a3da23f33795c406bd Mon Sep 17 00:00:00 2001 From: Giuseppe Lo Presti Date: Thu, 13 Jul 2023 12:16:43 +0200 Subject: [PATCH 5/5] Removed files not relevant to Reva --- db/README.md | 56 -- db/drop_oc_unused_tables.sql | 48 -- db/drop_old_cernbox_tables.sql | 2 - db/owncloud_db_dump.sql | 1130 -------------------------------- 4 files changed, 1236 deletions(-) delete mode 100644 db/README.md delete mode 100644 db/drop_oc_unused_tables.sql delete mode 100644 db/drop_old_cernbox_tables.sql delete mode 100644 db/owncloud_db_dump.sql diff --git a/db/README.md b/db/README.md deleted file mode 100644 index 06f004ca4e..0000000000 --- a/db/README.md +++ /dev/null @@ -1,56 +0,0 @@ -CERNBox DB schema -================= - -The CERNBox database schema inherits the ownCloud 10 schema and adds Reva-specific tables. - -This file describes the state of the database following a reverse engineering analysis. - -The following tables with their corresponding cardinalities are used in production and referenced in Reva as of July 2023: - -* oc_preferences # 65K -* oc_share # 490K -* oc_share_status # 24K - -* cernbox_project_mapping # 1K -* cbox_metadata # 10K, to store favourites -* cbox_otg_ocis # empty, to be deprecated in favour of notifications - -* notifications -* notification_recipients - -* ocm_access_method_webapp -* ocm_access_method_webdav -* ocm_protocol_transfer -* ocm_protocol_webapp -* ocm_protocol_webdav -* ocm_received_share_protocols -* ocm_received_shares -* ocm_remote_users -* ocm_shares -* ocm_shares_access_methods -* ocm_tokens - -The following tables contain several records (possibly used by ownCloud in the past) but are not used by Reva: - -* oc_mounts -* oc_share_acl -* oc_share_acl_old -* oc_addressbooks -* oc_accounts - -The following tables were used in the past but not any longer: - -* cbox_canary -* cbox_office_engine - -The following table was populated by hand and it is not used by Reva: - -* oc_sciencemesh - -The scripts in this folder include: -* An `init.sql` script to create a database schema from scratch that works with latest Reva. - -Furthermore, for historical record: -* An `owncloud_db_dump.sql` script to represent the current state of the DB as of July 2023. -* Some `setup_*.sql` scripts to add schema features as they are developed and published. -* Some `drop_*.sql` scripts to clean up a production schema that was used with former legacy systems. diff --git a/db/drop_oc_unused_tables.sql b/db/drop_oc_unused_tables.sql deleted file mode 100644 index 782fcee6b0..0000000000 --- a/db/drop_oc_unused_tables.sql +++ /dev/null @@ -1,48 +0,0 @@ -DROP TABLE IF EXISTS `oc_account_terms`; -DROP TABLE IF EXISTS `oc_addressbookchanges`; -DROP TABLE IF EXISTS `oc_appconfig`; -DROP TABLE IF EXISTS `oc_authtoken`; -DROP TABLE IF EXISTS `oc_calendarchanges`; -DROP TABLE IF EXISTS `oc_calendarobjects`; -DROP TABLE IF EXISTS `oc_calendars`; -DROP TABLE IF EXISTS `oc_calendarsubscriptions`; -DROP TABLE IF EXISTS `oc_cards`; -DROP TABLE IF EXISTS `oc_cards_properties`; -DROP TABLE IF EXISTS `oc_comments`; -DROP TABLE IF EXISTS `oc_comments_read_markers`; -DROP TABLE IF EXISTS `oc_credentials`; -DROP TABLE IF EXISTS `oc_dav_properties`; -DROP TABLE IF EXISTS `oc_dav_shares`; -DROP TABLE IF EXISTS `oc_external_applicable`; -DROP TABLE IF EXISTS `oc_external_config`; -DROP TABLE IF EXISTS `oc_external_mounts`; -DROP TABLE IF EXISTS `oc_external_options`; -DROP TABLE IF EXISTS `oc_federated_reshares`; -DROP TABLE IF EXISTS `oc_file_locks`; -DROP TABLE IF EXISTS `oc_filecache`; -DROP TABLE IF EXISTS `oc_files_trash`; -DROP TABLE IF EXISTS `oc_group_admin`; -DROP TABLE IF EXISTS `oc_group_user`; -DROP TABLE IF EXISTS `oc_groups`; -DROP TABLE IF EXISTS `oc_jobs`; -DROP TABLE IF EXISTS `oc_migrations`; -DROP TABLE IF EXISTS `oc_mimetypes`; -DROP TABLE IF EXISTS `oc_privatedata`; -DROP TABLE IF EXISTS `oc_properties`; -DROP TABLE IF EXISTS `oc_schedulingobjects`; -DROP TABLE IF EXISTS `oc_storages`; -DROP TABLE IF EXISTS `oc_systemtag`; -DROP TABLE IF EXISTS `oc_systemtag_group`; -DROP TABLE IF EXISTS `oc_systemtag_object_mapping`; -DROP TABLE IF EXISTS `oc_trusted_servers`; -DROP TABLE IF EXISTS `oc_users`; -DROP TABLE IF EXISTS `oc_vcategory`; -DROP TABLE IF EXISTS `oc_vcategory_to_object`; -DROP TABLE IF EXISTS `oc_share_copy`; -DROP TABLE IF EXISTS `oc_share_external`; -DROP TABLE IF EXISTS `test_ocshare`; -DROP TABLE IF EXISTS `oc_share_acl`; -DROP TABLE IF EXISTS `oc_share_acl_old`; -DROP TABLE IF EXISTS `oc_accounts`; -DROP TABLE IF EXISTS `oc_addressbooks`; -DROP TABLE IF EXISTS `oc_mounts`; diff --git a/db/drop_old_cernbox_tables.sql b/db/drop_old_cernbox_tables.sql deleted file mode 100644 index 0ea723534b..0000000000 --- a/db/drop_old_cernbox_tables.sql +++ /dev/null @@ -1,2 +0,0 @@ -DROP TABLE IF EXISTS `cbox_canary`; -DROP TABLE IF EXISTS `cbox_office_engine`; diff --git a/db/owncloud_db_dump.sql b/db/owncloud_db_dump.sql deleted file mode 100644 index 1454c42aa1..0000000000 --- a/db/owncloud_db_dump.sql +++ /dev/null @@ -1,1130 +0,0 @@ --- MySQL dump 10.14 Distrib 5.5.68-MariaDB, for Linux (x86_64) --- --- Host: dbod-cboxeos.cern.ch Database: cernboxngcopy --- ------------------------------------------------------ --- Server version 5.7.37-log - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; -/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; -/*!40103 SET TIME_ZONE='+00:00' */; -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; - --- --- Table structure for table `cbox_canary` --- - -DROP TABLE IF EXISTS `cbox_canary`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `cbox_canary` ( - `username` varchar(255) NOT NULL DEFAULT '', - `adopter` varchar(10) DEFAULT NULL, - PRIMARY KEY (`username`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `cbox_metadata` --- - -DROP TABLE IF EXISTS `cbox_metadata`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `cbox_metadata` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `item_type` int(11) NOT NULL, - `uid` varchar(64) NOT NULL, - `fileid_prefix` varchar(255) NOT NULL, - `fileid` varchar(255) NOT NULL, - `tag_key` varchar(255) NOT NULL, - `tag_val` varchar(255) DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=11622 DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `cbox_office_engine` --- - -DROP TABLE IF EXISTS `cbox_office_engine`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `cbox_office_engine` ( - `username` varchar(255) NOT NULL DEFAULT '', - `office` varchar(255) DEFAULT NULL, - PRIMARY KEY (`username`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `cbox_otg` --- - -DROP TABLE IF EXISTS `cbox_otg`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `cbox_otg` ( - `id` mediumint(9) NOT NULL AUTO_INCREMENT, - `message` text NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `cbox_otg_ocis` --- - -DROP TABLE IF EXISTS `cbox_otg_ocis`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `cbox_otg_ocis` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `message` text NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `cernbox_project_mapping` --- - -DROP TABLE IF EXISTS `cernbox_project_mapping`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `cernbox_project_mapping` ( - `project_name` varchar(50) NOT NULL, - `eos_relative_path` varchar(50) NOT NULL, - `project_owner` varchar(50) NOT NULL DEFAULT 'temp', - PRIMARY KEY (`project_name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_account_terms` --- - -DROP TABLE IF EXISTS `oc_account_terms`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_account_terms` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `account_id` bigint(20) unsigned NOT NULL, - `term` varchar(191) COLLATE utf8_bin NOT NULL, - PRIMARY KEY (`id`), - KEY `account_id_index` (`account_id`), - KEY `term_index` (`term`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_accounts` --- - -DROP TABLE IF EXISTS `oc_accounts`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_accounts` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `email` varchar(255) COLLATE utf8_bin DEFAULT NULL, - `user_id` varchar(255) COLLATE utf8_bin NOT NULL, - `lower_user_id` varchar(255) COLLATE utf8_bin NOT NULL, - `display_name` varchar(255) COLLATE utf8_bin DEFAULT NULL, - `quota` varchar(32) COLLATE utf8_bin DEFAULT NULL, - `last_login` int(11) NOT NULL DEFAULT '0', - `backend` varchar(64) COLLATE utf8_bin NOT NULL, - `home` varchar(1024) COLLATE utf8_bin NOT NULL, - `state` smallint(6) NOT NULL DEFAULT '0' COMMENT '0: initial, 1: enabled, 2: disabled, 3: deleted', - PRIMARY KEY (`id`), - UNIQUE KEY `UNIQ_907AA303A76ED395` (`user_id`), - UNIQUE KEY `lower_user_id_index` (`lower_user_id`), - KEY `display_name_index` (`display_name`), - KEY `email_index` (`email`) -) ENGINE=InnoDB AUTO_INCREMENT=20725 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_addressbookchanges` --- - -DROP TABLE IF EXISTS `oc_addressbookchanges`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_addressbookchanges` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `uri` varchar(255) COLLATE utf8_bin DEFAULT NULL, - `synctoken` int(10) unsigned NOT NULL DEFAULT '1', - `addressbookid` int(11) NOT NULL, - `operation` smallint(6) NOT NULL, - PRIMARY KEY (`id`), - KEY `addressbookid_synctoken` (`addressbookid`,`synctoken`) -) ENGINE=InnoDB AUTO_INCREMENT=2806 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_addressbooks` --- - -DROP TABLE IF EXISTS `oc_addressbooks`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_addressbooks` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `principaluri` varchar(255) COLLATE utf8_bin DEFAULT NULL, - `displayname` varchar(255) COLLATE utf8_bin DEFAULT NULL, - `uri` varchar(255) COLLATE utf8_bin DEFAULT NULL, - `description` varchar(255) COLLATE utf8_bin DEFAULT NULL, - `synctoken` int(10) unsigned NOT NULL DEFAULT '1', - PRIMARY KEY (`id`), - UNIQUE KEY `addressbook_index` (`principaluri`,`uri`) -) ENGINE=InnoDB AUTO_INCREMENT=20697 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_appconfig` --- - -DROP TABLE IF EXISTS `oc_appconfig`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_appconfig` ( - `appid` varchar(32) COLLATE utf8_bin NOT NULL DEFAULT '', - `configkey` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `configvalue` longtext COLLATE utf8_bin, - PRIMARY KEY (`appid`,`configkey`), - KEY `appconfig_config_key_index` (`configkey`), - KEY `appconfig_appid_key` (`appid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_authtoken` --- - -DROP TABLE IF EXISTS `oc_authtoken`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_authtoken` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `uid` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `login_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `password` longtext COLLATE utf8_bin, - `name` longtext COLLATE utf8_bin NOT NULL, - `token` varchar(200) COLLATE utf8_bin NOT NULL DEFAULT '', - `type` smallint(5) unsigned NOT NULL DEFAULT '0', - `last_activity` int(10) unsigned NOT NULL DEFAULT '0', - `last_check` int(10) unsigned NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `authtoken_token_index` (`token`), - KEY `authtoken_last_activity_index` (`last_activity`) -) ENGINE=InnoDB AUTO_INCREMENT=1116403 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_calendarchanges` --- - -DROP TABLE IF EXISTS `oc_calendarchanges`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_calendarchanges` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `uri` varchar(255) COLLATE utf8_bin DEFAULT NULL, - `synctoken` int(10) unsigned NOT NULL DEFAULT '1', - `calendarid` int(11) NOT NULL, - `operation` smallint(6) NOT NULL, - PRIMARY KEY (`id`), - KEY `calendarid_synctoken` (`calendarid`,`synctoken`) -) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_calendarobjects` --- - -DROP TABLE IF EXISTS `oc_calendarobjects`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_calendarobjects` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `calendardata` longblob, - `uri` varchar(255) COLLATE utf8_bin DEFAULT NULL, - `calendarid` int(10) unsigned NOT NULL, - `lastmodified` int(10) unsigned DEFAULT NULL, - `etag` varchar(32) COLLATE utf8_bin DEFAULT NULL, - `size` bigint(20) unsigned NOT NULL, - `componenttype` varchar(8) COLLATE utf8_bin DEFAULT NULL, - `firstoccurence` bigint(20) unsigned DEFAULT NULL, - `lastoccurence` bigint(20) unsigned DEFAULT NULL, - `uid` varchar(255) COLLATE utf8_bin DEFAULT NULL, - `classification` int(11) DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `calobjects_index` (`calendarid`,`uri`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_calendars` --- - -DROP TABLE IF EXISTS `oc_calendars`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_calendars` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `principaluri` varchar(255) COLLATE utf8_bin DEFAULT NULL, - `displayname` varchar(255) COLLATE utf8_bin DEFAULT NULL, - `uri` varchar(255) COLLATE utf8_bin DEFAULT NULL, - `synctoken` int(10) unsigned NOT NULL DEFAULT '1', - `description` varchar(255) COLLATE utf8_bin DEFAULT NULL, - `calendarorder` int(10) unsigned NOT NULL DEFAULT '0', - `calendarcolor` varchar(255) COLLATE utf8_bin DEFAULT NULL, - `timezone` longtext COLLATE utf8_bin, - `components` varchar(20) COLLATE utf8_bin DEFAULT NULL, - `transparent` smallint(6) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `calendars_index` (`principaluri`,`uri`) -) ENGINE=InnoDB AUTO_INCREMENT=20707 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_calendarsubscriptions` --- - -DROP TABLE IF EXISTS `oc_calendarsubscriptions`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_calendarsubscriptions` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `uri` varchar(255) COLLATE utf8_bin DEFAULT NULL, - `principaluri` varchar(255) COLLATE utf8_bin DEFAULT NULL, - `source` varchar(255) COLLATE utf8_bin DEFAULT NULL, - `displayname` varchar(100) COLLATE utf8_bin DEFAULT NULL, - `refreshrate` varchar(10) COLLATE utf8_bin DEFAULT NULL, - `calendarorder` int(10) unsigned NOT NULL DEFAULT '0', - `calendarcolor` varchar(255) COLLATE utf8_bin DEFAULT NULL, - `striptodos` smallint(6) DEFAULT NULL, - `stripalarms` smallint(6) DEFAULT NULL, - `stripattachments` smallint(6) DEFAULT NULL, - `lastmodified` int(10) unsigned NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `calsub_index` (`principaluri`,`uri`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_cards` --- - -DROP TABLE IF EXISTS `oc_cards`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_cards` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `addressbookid` int(11) NOT NULL DEFAULT '0', - `carddata` longblob, - `uri` varchar(255) COLLATE utf8_bin DEFAULT NULL, - `lastmodified` bigint(20) unsigned DEFAULT NULL, - `etag` varchar(32) COLLATE utf8_bin DEFAULT NULL, - `size` bigint(20) unsigned NOT NULL, - PRIMARY KEY (`id`), - KEY `addressbookid_uri_index` (`addressbookid`,`uri`) -) ENGINE=InnoDB AUTO_INCREMENT=2780 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_cards_properties` --- - -DROP TABLE IF EXISTS `oc_cards_properties`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_cards_properties` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `addressbookid` bigint(20) NOT NULL DEFAULT '0', - `cardid` bigint(20) unsigned NOT NULL DEFAULT '0', - `name` varchar(64) COLLATE utf8_bin DEFAULT NULL, - `value` varchar(255) COLLATE utf8_bin DEFAULT NULL, - `preferred` int(11) NOT NULL DEFAULT '1', - PRIMARY KEY (`id`), - KEY `card_value_index` (`value`), - KEY `card_name_index` (`name`), - KEY `card_contactid_index` (`cardid`) -) ENGINE=InnoDB AUTO_INCREMENT=11213 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_comments` --- - -DROP TABLE IF EXISTS `oc_comments`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_comments` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `parent_id` int(10) unsigned NOT NULL DEFAULT '0', - `topmost_parent_id` int(10) unsigned NOT NULL DEFAULT '0', - `children_count` int(10) unsigned NOT NULL DEFAULT '0', - `actor_type` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `actor_id` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `message` longtext COLLATE utf8_bin, - `verb` varchar(64) COLLATE utf8_bin DEFAULT NULL, - `creation_timestamp` datetime DEFAULT NULL, - `latest_child_timestamp` datetime DEFAULT NULL, - `object_type` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `object_id` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', - PRIMARY KEY (`id`), - KEY `comments_parent_id_index` (`parent_id`), - KEY `comments_topmost_parent_id_idx` (`topmost_parent_id`), - KEY `comments_object_index` (`object_type`,`object_id`,`creation_timestamp`), - KEY `comments_actor_index` (`actor_type`,`actor_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_comments_read_markers` --- - -DROP TABLE IF EXISTS `oc_comments_read_markers`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_comments_read_markers` ( - `user_id` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `marker_datetime` datetime DEFAULT NULL, - `object_type` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `object_id` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', - UNIQUE KEY `comments_marker_index` (`user_id`,`object_type`,`object_id`), - KEY `comments_marker_object_index` (`object_type`,`object_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_credentials` --- - -DROP TABLE IF EXISTS `oc_credentials`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_credentials` ( - `user` varchar(64) COLLATE utf8_bin NOT NULL, - `identifier` varchar(64) COLLATE utf8_bin NOT NULL, - `credentials` longtext COLLATE utf8_bin, - PRIMARY KEY (`user`,`identifier`), - KEY `credentials_user` (`user`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_dav_properties` --- - -DROP TABLE IF EXISTS `oc_dav_properties`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_dav_properties` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `propertypath` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '', - `propertyname` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '', - `propertyvalue` varchar(255) COLLATE utf8_bin NOT NULL, - PRIMARY KEY (`id`), - KEY `propertypath_index` (`propertypath`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_dav_shares` --- - -DROP TABLE IF EXISTS `oc_dav_shares`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_dav_shares` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `principaluri` varchar(255) COLLATE utf8_bin DEFAULT NULL, - `type` varchar(255) COLLATE utf8_bin DEFAULT NULL, - `access` smallint(6) DEFAULT NULL, - `resourceid` int(10) unsigned NOT NULL, - `publicuri` varchar(255) COLLATE utf8_bin DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `dav_shares_index` (`principaluri`,`resourceid`,`type`,`publicuri`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_external_applicable` --- - -DROP TABLE IF EXISTS `oc_external_applicable`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_external_applicable` ( - `applicable_id` bigint(20) NOT NULL AUTO_INCREMENT, - `mount_id` bigint(20) NOT NULL, - `type` int(11) NOT NULL, - `value` varchar(64) COLLATE utf8_bin DEFAULT NULL, - PRIMARY KEY (`applicable_id`), - UNIQUE KEY `applicable_type_value_mount` (`type`,`value`,`mount_id`), - KEY `applicable_mount` (`mount_id`), - KEY `applicable_type_value` (`type`,`value`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_external_config` --- - -DROP TABLE IF EXISTS `oc_external_config`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_external_config` ( - `config_id` bigint(20) NOT NULL AUTO_INCREMENT, - `mount_id` bigint(20) NOT NULL, - `key` varchar(64) COLLATE utf8_bin NOT NULL, - `value` varchar(4096) COLLATE utf8_bin NOT NULL, - PRIMARY KEY (`config_id`), - UNIQUE KEY `config_mount_key` (`mount_id`,`key`), - KEY `config_mount` (`mount_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_external_mounts` --- - -DROP TABLE IF EXISTS `oc_external_mounts`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_external_mounts` ( - `mount_id` bigint(20) NOT NULL AUTO_INCREMENT, - `mount_point` varchar(128) COLLATE utf8_bin NOT NULL, - `storage_backend` varchar(64) COLLATE utf8_bin NOT NULL, - `auth_backend` varchar(64) COLLATE utf8_bin NOT NULL, - `priority` int(11) NOT NULL DEFAULT '100', - `type` int(11) NOT NULL, - PRIMARY KEY (`mount_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_external_options` --- - -DROP TABLE IF EXISTS `oc_external_options`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_external_options` ( - `option_id` bigint(20) NOT NULL AUTO_INCREMENT, - `mount_id` bigint(20) NOT NULL, - `key` varchar(64) COLLATE utf8_bin NOT NULL, - `value` varchar(256) COLLATE utf8_bin NOT NULL, - PRIMARY KEY (`option_id`), - UNIQUE KEY `option_mount_key` (`mount_id`,`key`), - KEY `option_mount` (`mount_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_federated_reshares` --- - -DROP TABLE IF EXISTS `oc_federated_reshares`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_federated_reshares` ( - `share_id` bigint(20) NOT NULL, - `remote_id` bigint(20) NOT NULL COMMENT 'share ID at the remote server', - UNIQUE KEY `share_id_index` (`share_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_file_locks` --- - -DROP TABLE IF EXISTS `oc_file_locks`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_file_locks` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `lock` int(11) NOT NULL DEFAULT '0', - `key` varchar(64) COLLATE utf8_bin NOT NULL, - `ttl` int(11) NOT NULL DEFAULT '-1', - PRIMARY KEY (`id`), - UNIQUE KEY `lock_key_index` (`key`), - KEY `lock_ttl_index` (`ttl`) -) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_filecache` --- - -DROP TABLE IF EXISTS `oc_filecache`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_filecache` ( - `fileid` bigint(20) NOT NULL AUTO_INCREMENT, - `storage` int(11) NOT NULL DEFAULT '0', - `path` varchar(4000) COLLATE utf8_bin DEFAULT NULL, - `path_hash` varchar(32) COLLATE utf8_bin NOT NULL DEFAULT '', - `parent` bigint(20) NOT NULL DEFAULT '0', - `name` varchar(250) COLLATE utf8_bin DEFAULT NULL, - `mimetype` int(11) NOT NULL DEFAULT '0', - `mimepart` int(11) NOT NULL DEFAULT '0', - `size` bigint(20) NOT NULL DEFAULT '0', - `mtime` bigint(20) NOT NULL DEFAULT '0', - `storage_mtime` bigint(20) NOT NULL DEFAULT '0', - `encrypted` int(11) NOT NULL DEFAULT '0', - `unencrypted_size` bigint(20) NOT NULL DEFAULT '0', - `etag` varchar(40) COLLATE utf8_bin DEFAULT NULL, - `permissions` int(11) DEFAULT '0', - `checksum` varchar(255) COLLATE utf8_bin DEFAULT NULL, - PRIMARY KEY (`fileid`), - UNIQUE KEY `fs_storage_path_hash` (`storage`,`path_hash`), - KEY `fs_parent_name_hash` (`parent`,`name`), - KEY `fs_storage_mimetype` (`storage`,`mimetype`), - KEY `fs_storage_mimepart` (`storage`,`mimepart`), - KEY `fs_storage_size` (`storage`,`size`,`fileid`) -) ENGINE=InnoDB AUTO_INCREMENT=5754 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_files_trash` --- - -DROP TABLE IF EXISTS `oc_files_trash`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_files_trash` ( - `auto_id` bigint(20) NOT NULL AUTO_INCREMENT, - `id` varchar(250) COLLATE utf8_bin NOT NULL DEFAULT '', - `user` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `timestamp` varchar(12) COLLATE utf8_bin NOT NULL DEFAULT '', - `location` varchar(512) COLLATE utf8_bin NOT NULL DEFAULT '', - `type` varchar(4) COLLATE utf8_bin DEFAULT NULL, - `mime` varchar(255) COLLATE utf8_bin DEFAULT NULL, - PRIMARY KEY (`auto_id`), - KEY `id_index` (`id`), - KEY `timestamp_index` (`timestamp`), - KEY `user_index` (`user`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_group_admin` --- - -DROP TABLE IF EXISTS `oc_group_admin`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_group_admin` ( - `gid` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `uid` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', - PRIMARY KEY (`gid`,`uid`), - KEY `group_admin_uid` (`uid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_group_user` --- - -DROP TABLE IF EXISTS `oc_group_user`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_group_user` ( - `gid` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `uid` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', - PRIMARY KEY (`gid`,`uid`), - KEY `gu_uid_index` (`uid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_groups` --- - -DROP TABLE IF EXISTS `oc_groups`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_groups` ( - `gid` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', - PRIMARY KEY (`gid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_jobs` --- - -DROP TABLE IF EXISTS `oc_jobs`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_jobs` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `class` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '', - `argument` varchar(4000) COLLATE utf8_bin NOT NULL DEFAULT '', - `last_run` int(11) DEFAULT '0', - `last_checked` int(11) DEFAULT '0', - `reserved_at` int(11) DEFAULT '0', - `execution_duration` int(11) NOT NULL DEFAULT '-1', - PRIMARY KEY (`id`), - KEY `job_class_index` (`class`) -) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_migrations` --- - -DROP TABLE IF EXISTS `oc_migrations`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_migrations` ( - `app` varchar(177) COLLATE utf8_bin NOT NULL, - `version` varchar(14) COLLATE utf8_bin NOT NULL, - PRIMARY KEY (`app`,`version`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_mimetypes` --- - -DROP TABLE IF EXISTS `oc_mimetypes`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_mimetypes` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `mimetype` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '', - PRIMARY KEY (`id`), - UNIQUE KEY `mimetype_id_index` (`mimetype`) -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_mounts` --- - -DROP TABLE IF EXISTS `oc_mounts`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_mounts` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `storage_id` int(11) NOT NULL, - `root_id` bigint(20) NOT NULL, - `user_id` varchar(64) COLLATE utf8_bin NOT NULL, - `mount_point` varchar(4000) COLLATE utf8_bin NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `mounts_user_root_index` (`user_id`,`root_id`), - KEY `mounts_user_index` (`user_id`), - KEY `mounts_storage_index` (`storage_id`), - KEY `mounts_root_index` (`root_id`) -) ENGINE=InnoDB AUTO_INCREMENT=20956 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_preferences` --- - -DROP TABLE IF EXISTS `oc_preferences`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_preferences` ( - `userid` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `appid` varchar(32) COLLATE utf8_bin NOT NULL DEFAULT '', - `configkey` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `configvalue` longtext COLLATE utf8_bin, - PRIMARY KEY (`userid`,`appid`,`configkey`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_privatedata` --- - -DROP TABLE IF EXISTS `oc_privatedata`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_privatedata` ( - `keyid` int(10) unsigned NOT NULL AUTO_INCREMENT, - `user` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `app` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '', - `key` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '', - `value` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '', - PRIMARY KEY (`keyid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_properties` --- - -DROP TABLE IF EXISTS `oc_properties`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_properties` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `fileid` bigint(20) unsigned DEFAULT NULL, - `propertyname` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '', - `propertyvalue` varchar(255) COLLATE utf8_bin NOT NULL, - PRIMARY KEY (`id`), - KEY `fileid_index` (`fileid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_schedulingobjects` --- - -DROP TABLE IF EXISTS `oc_schedulingobjects`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_schedulingobjects` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `principaluri` varchar(255) COLLATE utf8_bin DEFAULT NULL, - `calendardata` longblob, - `uri` varchar(255) COLLATE utf8_bin DEFAULT NULL, - `lastmodified` int(10) unsigned DEFAULT NULL, - `etag` varchar(32) COLLATE utf8_bin DEFAULT NULL, - `size` bigint(20) unsigned NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_sciencemesh` --- - -DROP TABLE IF EXISTS `oc_sciencemesh`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_sciencemesh` ( - `iopurl` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT 'http://localhost:10999', - `country` varchar(2) COLLATE utf8_bin NOT NULL, - `hostname` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT 'example.org', - `sitename` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT 'CERNBox', - `siteurl` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT 'http://localhost', - `numusers` bigint(20) unsigned DEFAULT '0', - `numfiles` bigint(20) unsigned DEFAULT '0', - `numstorage` bigint(20) unsigned DEFAULT '0' -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_share` --- - -DROP TABLE IF EXISTS `oc_share`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_share` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `share_type` smallint(6) NOT NULL DEFAULT '0', - `share_with` varchar(255) COLLATE utf8_bin DEFAULT NULL, - `uid_owner` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `uid_initiator` varchar(64) COLLATE utf8_bin DEFAULT NULL, - `parent` int(11) DEFAULT NULL, - `item_type` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `item_source` varchar(255) COLLATE utf8_bin DEFAULT NULL, - `item_target` varchar(255) COLLATE utf8_bin DEFAULT NULL, - `file_source` bigint(20) unsigned DEFAULT NULL, - `file_target` varchar(512) COLLATE utf8_bin DEFAULT NULL, - `permissions` smallint(6) NOT NULL DEFAULT '0', - `stime` bigint(20) NOT NULL DEFAULT '0', - `accepted` smallint(6) NOT NULL DEFAULT '0', - `expiration` datetime DEFAULT NULL, - `token` varchar(32) COLLATE utf8_bin DEFAULT NULL, - `mail_send` smallint(6) NOT NULL DEFAULT '0', - `fileid_prefix` varchar(255) COLLATE utf8_bin DEFAULT NULL, - `orphan` tinyint(4) DEFAULT NULL, - `share_name` varchar(255) COLLATE utf8_bin DEFAULT NULL, - `quicklink` tinyint(1) NOT NULL DEFAULT '0', - `description` varchar(1024) COLLATE utf8_bin NOT NULL DEFAULT '', - `internal` tinyint(1) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `item_share_type_index` (`item_type`,`share_type`), - KEY `file_source_index` (`file_source`), - KEY `token_index` (`token`), - KEY `index_internal` (`internal`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=336217 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_share_acl` --- - -DROP TABLE IF EXISTS `oc_share_acl`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_share_acl` ( - `id` int(11) NOT NULL, - `rejected_by` varchar(255) NOT NULL, - PRIMARY KEY (`id`,`rejected_by`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_share_acl_old` --- - -DROP TABLE IF EXISTS `oc_share_acl_old`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_share_acl_old` ( - `id` int(11) NOT NULL, - `rejected_by` varchar(255) NOT NULL, - KEY `id` (`id`), - CONSTRAINT `oc_share_acl_old_ibfk_1` FOREIGN KEY (`id`) REFERENCES `oc_share` (`id`) ON DELETE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_share_copy` --- - -DROP TABLE IF EXISTS `oc_share_copy`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_share_copy` ( - `id` int(11) NOT NULL DEFAULT '0', - `share_type` smallint(6) NOT NULL DEFAULT '0', - `share_with` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, - `uid_owner` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', - `uid_initiator` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, - `parent` int(11) DEFAULT NULL, - `item_type` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', - `item_source` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, - `item_target` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, - `file_source` bigint(20) unsigned DEFAULT NULL, - `file_target` varchar(512) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, - `permissions` smallint(6) NOT NULL DEFAULT '0', - `stime` bigint(20) NOT NULL DEFAULT '0', - `accepted` smallint(6) NOT NULL DEFAULT '0', - `expiration` datetime DEFAULT NULL, - `token` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, - `mail_send` smallint(6) NOT NULL DEFAULT '0', - `fileid_prefix` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, - `orphan` tinyint(4) DEFAULT NULL, - `share_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_share_external` --- - -DROP TABLE IF EXISTS `oc_share_external`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_share_external` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `remote` varchar(512) COLLATE utf8_bin NOT NULL COMMENT 'Url of the remote owncloud instance', - `remote_id` bigint(20) NOT NULL DEFAULT '-1', - `share_token` varchar(64) COLLATE utf8_bin NOT NULL COMMENT 'Public share token', - `password` varchar(64) COLLATE utf8_bin DEFAULT NULL COMMENT 'Optional password for the public share', - `name` varchar(64) COLLATE utf8_bin NOT NULL COMMENT 'Original name on the remote server', - `owner` varchar(64) COLLATE utf8_bin NOT NULL COMMENT 'User that owns the public share on the remote server', - `user` varchar(64) COLLATE utf8_bin NOT NULL COMMENT 'Local user which added the external share', - `mountpoint` varchar(4000) COLLATE utf8_bin NOT NULL COMMENT 'Full path where the share is mounted', - `mountpoint_hash` varchar(32) COLLATE utf8_bin NOT NULL COMMENT 'md5 hash of the mountpoint', - `accepted` int(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `sh_external_mp` (`user`,`mountpoint_hash`), - KEY `sh_external_user` (`user`) -) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_share_status` --- - -DROP TABLE IF EXISTS `oc_share_status`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_share_status` ( - `id` int(11) NOT NULL, - `recipient` varchar(255) NOT NULL, - `state` int(11) DEFAULT '0', - PRIMARY KEY (`id`,`recipient`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_storages` --- - -DROP TABLE IF EXISTS `oc_storages`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_storages` ( - `id` varchar(64) COLLATE utf8_bin DEFAULT NULL, - `numeric_id` int(11) NOT NULL AUTO_INCREMENT, - `available` int(11) NOT NULL DEFAULT '1', - `last_checked` int(11) DEFAULT NULL, - PRIMARY KEY (`numeric_id`), - UNIQUE KEY `storages_id_index` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_systemtag` --- - -DROP TABLE IF EXISTS `oc_systemtag`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_systemtag` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `visibility` smallint(6) NOT NULL DEFAULT '1', - `editable` smallint(6) NOT NULL DEFAULT '1', - PRIMARY KEY (`id`), - UNIQUE KEY `tag_ident` (`name`,`visibility`,`editable`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_systemtag_group` --- - -DROP TABLE IF EXISTS `oc_systemtag_group`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_systemtag_group` ( - `systemtagid` int(10) unsigned NOT NULL DEFAULT '0', - `gid` varchar(255) COLLATE utf8_bin NOT NULL, - PRIMARY KEY (`gid`,`systemtagid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_systemtag_object_mapping` --- - -DROP TABLE IF EXISTS `oc_systemtag_object_mapping`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_systemtag_object_mapping` ( - `objectid` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `objecttype` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `systemtagid` int(10) unsigned NOT NULL DEFAULT '0', - UNIQUE KEY `mapping` (`objecttype`,`objectid`,`systemtagid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_trusted_servers` --- - -DROP TABLE IF EXISTS `oc_trusted_servers`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_trusted_servers` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `url` varchar(512) COLLATE utf8_bin NOT NULL COMMENT 'Url of trusted server', - `url_hash` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT 'sha1 hash of the url without the protocol', - `token` varchar(128) COLLATE utf8_bin DEFAULT NULL COMMENT 'token used to exchange the shared secret', - `shared_secret` varchar(256) COLLATE utf8_bin DEFAULT NULL COMMENT 'shared secret used to authenticate', - `status` int(11) NOT NULL DEFAULT '2' COMMENT 'current status of the connection', - `sync_token` varchar(512) COLLATE utf8_bin DEFAULT NULL COMMENT 'cardDav sync token', - PRIMARY KEY (`id`), - UNIQUE KEY `url_hash` (`url_hash`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_users` --- - -DROP TABLE IF EXISTS `oc_users`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_users` ( - `uid` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `displayname` varchar(64) COLLATE utf8_bin DEFAULT NULL, - `password` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '', - PRIMARY KEY (`uid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_vcategory` --- - -DROP TABLE IF EXISTS `oc_vcategory`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_vcategory` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `uid` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `type` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `category` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '', - PRIMARY KEY (`id`), - KEY `uid_index` (`uid`), - KEY `type_index` (`type`), - KEY `category_index` (`category`) -) ENGINE=InnoDB AUTO_INCREMENT=1925 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `oc_vcategory_to_object` --- - -DROP TABLE IF EXISTS `oc_vcategory_to_object`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oc_vcategory_to_object` ( - `objid` int(10) unsigned NOT NULL DEFAULT '0', - `categoryid` int(10) unsigned NOT NULL DEFAULT '0', - `type` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', - PRIMARY KEY (`categoryid`,`objid`,`type`), - KEY `vcategory_objectd_index` (`objid`,`type`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `test_ocshare` --- - -DROP TABLE IF EXISTS `test_ocshare`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `test_ocshare` ( - `id` int(11) NOT NULL DEFAULT '0', - `share_type` smallint(6) NOT NULL DEFAULT '0', - `share_with` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, - `uid_owner` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', - `uid_initiator` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, - `parent` int(11) DEFAULT NULL, - `item_type` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', - `item_source` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, - `item_target` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, - `file_source` bigint(20) unsigned DEFAULT NULL, - `permissions` smallint(6) NOT NULL DEFAULT '0', - `stime` bigint(20) NOT NULL DEFAULT '0', - `accepted` smallint(6) NOT NULL DEFAULT '0', - `expiration` datetime DEFAULT NULL, - `token` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, - `mail_send` smallint(6) NOT NULL DEFAULT '0', - `fileid_prefix` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, - `orphan` tinyint(4) DEFAULT NULL, - `share_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; - -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; - --- Dump completed on 2023-07-06 16:41:58