*dbname* true false utf8 *dbprefix*appconfig appid text true 32 configkey text true 64 configvalue clob false appconfig_appid_key_index true true appid ascending configkey ascending appconfig_config_key_index configkey ascending appconfig_appid_key appid ascending
*dbprefix*storages id text false 64 numeric_id integer 0 true 1 4 available integer 1 true last_checked integer storages_id_index true id ascending
*dbprefix*mounts id integer 0 true 1 4 storage_id integer true root_id integer true user_id text true 64 mount_point text true 4000 mounts_user_index false user_id ascending mounts_storage_index false storage_id ascending mounts_root_index false root_id ascending mounts_user_root_index true user_id ascending root_id ascending
*dbprefix*mimetypes id integer 0 true 1 4 mimetype text true 255 mimetype_id_index true mimetype ascending
*dbprefix*filecache fileid integer 0 true 1 4 storage integer true 4 path text false 4000 path_hash text true 32 parent integer true 4 name text false 250 mimetype integer true 4 mimepart integer true 4 size integer true 8 mtime integer true 4 storage_mtime integer true 4 encrypted integer 0 true 4 unencrypted_size integer 0 true 8 etag text false 40 permissions integer 0 false 4 checksum text false 255 fs_storage_path_hash true storage ascending path_hash ascending fs_parent_name_hash parent ascending name ascending fs_storage_mimetype storage ascending mimetype ascending fs_storage_mimepart storage ascending mimepart ascending fs_storage_size storage ascending size ascending fileid
*dbprefix*group_user gid text true 64 uid text true 64 gu_gid_uid_index true true gid ascending uid ascending gu_uid_index uid ascending
*dbprefix*group_admin gid text true 64 uid text true 64 group_admin_uid uid ascending ga_gid_uid_index true true gid ascending uid ascending
*dbprefix*groups gid text true 64 groups_pKey true gid ascending
*dbprefix*preferences userid text true 64 appid text true 32 configkey text true 64 configvalue clob false pref_userid_appid_key_index true true userid ascending appid ascending configkey ascending
*dbprefix*properties id 1 integer 0 true 4 userid text true 64 propertypath text true 255 propertyname text true 255 propertyvalue text true 255 property_index userid ascending
*dbprefix*share id 1 integer 0 true 4 share_type integer 0 true 1 share_with text false 255 uid_owner text true 64 uid_initiator text false 64 parent integer false 4 item_type text true 64 item_source text false 255 item_target text false 255 file_source integer false 4 file_target text false 512 permissions integer 0 true 1 stime integer 0 true 8 accepted integer 0 true 1 expiration timestamp false token text false 32 mail_send integer 0 true 1 item_share_type_index item_type ascending share_type ascending file_source_index file_source ascending token_index token ascending
*dbprefix*jobs id integer 0 true 1 true 4 class text true 255 argument text true 4000 last_run integer false job_class_index class ascending
*dbprefix*users uid text true 64 displayname text 64 password text true 255 users_pKey true uid ascending
*dbprefix*vcategory id integer 0 true 1 true 4 uid text true 64 type text true 64 category text true 255 uid_index uid ascending type_index type ascending category_index category ascending
*dbprefix*vcategory_to_object objid integer 0 true true 4 categoryid integer 0 true true 4 type text true 64 true true category_object_index categoryid ascending objid ascending type ascending vcategory_objectd_index objid ascending type ascending
*dbprefix*systemtag id integer 0 true 1 true 4 name text true 64 visibility integer 1 true 1 editable integer 1 true 1 tag_ident true name ascending visibility ascending editable ascending
*dbprefix*systemtag_object_mapping objectid text true 64 objecttype text true 64 systemtagid integer 0 true true 4 true mapping objecttype ascending objectid ascending systemtagid ascending
*dbprefix*privatedata keyid integer 0 true true 4 1 user text true 64 app text true 255 key text true 255 value text true 255 true true keyid_index keyid ascending
*dbprefix*file_locks id integer 0 true true 4 1 lock integer 0 true 4 key text true 64 ttl integer -1 true 4 true true lock_id_index id ascending true lock_key_index key ascending lock_ttl_index ttl ascending
*dbprefix*comments id integer 0 true true 4 1 parent_id integer 0 true true 4 topmost_parent_id integer 0 true true 4 children_count integer 0 true true 4 actor_type text true 64 actor_id text true 64 message clob false verb text false 64 creation_timestamp timestamp false latest_child_timestamp timestamp false object_type text true 64 object_id text true 64
*dbprefix*comments_read_markers user_id text true 64 marker_datetime timestamp false object_type text true 64 object_id text true 64
*dbprefix*credentials user text false 64 identifier text true 64 credentials clob false credentials_user_id true true user ascending identifier ascending credentials_user false user ascending
> Nextcloud server, a safe home for all your data: https://github.com/nextcloud/serverwww-data
aboutsummaryrefslogtreecommitdiffstats
path: root/core/Migrations/Version17000Date20190514105811.php
blob: b603e85c8f663cd2a8ebb359b87b3297ea0cb5a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php

declare(strict_types=1);

/**
 * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */
namespace OC\Core\Migrations;

use Closure;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

class Version17000Date20190514105811 extends SimpleMigrationStep {
	/**
	 * @param IOutput $output
	 * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
	 * @param array $options
	 * @return ISchemaWrapper
	 */
	public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) {
		/** @var ISchemaWrapper $schema */
		$schema = $schemaClosure();
		if (!$schema->hasTable('filecache_extended')) {
			$table = $schema->createTable('filecache_extended');
			$table->addColumn('fileid', Types::BIGINT, [
				'notnull' => true,
				'length' => 4,
				'unsigned' => true,
			]);
			$table->addColumn('metadata_etag', Types::STRING, [
				'notnull' => false,
				'length' => 40,
			]);
			$table->addColumn('creation_time', Types::BIGINT, [
				'notnull' => true,
				'length' => 20,
				'default' => 0,
			]);
			$table->addColumn('upload_time', Types::BIGINT, [
				'notnull' => true,
				'length' => 20,
				'default' => 0,
			]);
			$table->setPrimaryKey(['fileid'], 'fce_pk');
			//			$table->addUniqueIndex(['fileid'], 'fce_fileid_idx');
			$table->addIndex(['creation_time'], 'fce_ctime_idx');
			$table->addIndex(['upload_time'], 'fce_utime_idx');
		}

		return $schema;
	}
}