ownCloudでは、管理用の情報をデータベースで管理しています。初期設定時にsqlite(デフォルト)とMySQLを選べるようになっています。
大規模でなければsqliteで十分でしょう。
大規模でなければsqliteで十分でしょう。
# sqlite3 -line data/owncloud.db 'select * from sqlite_master;' type = table name = oc_appconfig tbl_name = oc_appconfig rootpage = 2 sql = CREATE TABLE "oc_appconfig" ("appid" VARCHAR(32) DEFAULT '' NOT NULL, "configkey" VARCHAR(64) DEFAULT '' NOT NULL, "configvalue" CLOB DEFAULT NULL, PRIMARY KEY("appid", "configkey")) type = index name = sqlite_autoindex_oc_appconfig_1 tbl_name = oc_appconfig rootpage = 3 sql = type = index name = appconfig_config_key_index tbl_name = oc_appconfig rootpage = 4 sql = CREATE INDEX appconfig_config_key_index ON "oc_appconfig" ("configkey") type = table name = oc_storages tbl_name = oc_storages rootpage = 5 sql = CREATE TABLE "oc_storages" ("id" VARCHAR(64) DEFAULT NULL, "numeric_id" INTEGER NOT NULL, PRIMARY KEY("numeric_id")) type = index name = storages_id_index tbl_name = oc_storages rootpage = 6 sql = CREATE UNIQUE INDEX storages_id_index ON "oc_storages" ("id") type = table name = oc_file_map tbl_name = oc_file_map rootpage = 7 sql = CREATE TABLE "oc_file_map" ("logic_path" VARCHAR(512) DEFAULT '' NOT NULL, "logic_path_hash" VARCHAR(32) DEFAULT '' NOT NULL, "physic_path" VARCHAR(512) DEFAULT '' NOT NULL, "physic_path_hash" VARCHAR(32) DEFAULT '' NOT NULL, PRIMARY KEY("logic_path_hash")) type = index name = sqlite_autoindex_oc_file_map_1 tbl_name = oc_file_map rootpage = 8 sql = type = index name = file_map_pp_index tbl_name = oc_file_map rootpage = 11 sql = CREATE UNIQUE INDEX file_map_pp_index ON "oc_file_map" ("physic_path_hash") type = table name = oc_mimetypes tbl_name = oc_mimetypes rootpage = 12 sql = CREATE TABLE "oc_mimetypes" ("id" INTEGER NOT NULL, "mimetype" VARCHAR(255) DEFAULT '' NOT NULL, PRIMARY KEY("id")) type = index name = mimetype_id_index tbl_name = oc_mimetypes rootpage = 13 sql = CREATE UNIQUE INDEX mimetype_id_index ON "oc_mimetypes" ("mimetype") type = table name = oc_filecache tbl_name = oc_filecache rootpage = 14 sql = CREATE TABLE "oc_filecache" ("fileid" INTEGER NOT NULL, "storage" INTEGER DEFAULT 0 NOT NULL, "path" VARCHAR(512) DEFAULT NULL, "path_hash" VARCHAR(32) DEFAULT '' NOT NULL, "parent" INTEGER DEFAULT 0 NOT NULL, "name" VARCHAR(250) DEFAULT NULL, "mimetype" INTEGER DEFAULT 0 NOT NULL, "mimepart" INTEGER DEFAULT 0 NOT NULL, "size" INTEGER DEFAULT '0' NOT NULL, "mtime" INTEGER DEFAULT 0 NOT NULL, "storage_mtime" INTEGER DEFAULT 0 NOT NULL, "encrypted" INTEGER DEFAULT 0 NOT NULL, "unencrypted_size" INTEGER DEFAULT '0' NOT NULL, "etag" VARCHAR(40) DEFAULT NULL, PRIMARY KEY("fileid")) type = index name = fs_storage_path_hash tbl_name = oc_filecache rootpage = 16 sql = CREATE UNIQUE INDEX fs_storage_path_hash ON "oc_filecache" ("storage", "path_hash") type = index name = fs_parent_name_hash tbl_name = oc_filecache rootpage = 17 sql = CREATE INDEX fs_parent_name_hash ON "oc_filecache" ("parent", "name") type = index name = fs_storage_mimetype tbl_name = oc_filecache rootpage = 18 sql = CREATE INDEX fs_storage_mimetype ON "oc_filecache" ("storage", "mimetype") type = index name = fs_storage_mimepart tbl_name = oc_filecache rootpage = 19 sql = CREATE INDEX fs_storage_mimepart ON "oc_filecache" ("storage", "mimepart") type = table name = oc_permissions tbl_name = oc_permissions rootpage = 21 sql = CREATE TABLE "oc_permissions" ("fileid" INTEGER DEFAULT 0 NOT NULL, "user" VARCHAR(64) DEFAULT NULL, "permissions" INTEGER DEFAULT 0 NOT NULL) type = index name = id_user_index tbl_name = oc_permissions rootpage = 22 sql = CREATE INDEX id_user_index ON "oc_permissions" ("fileid", "user") type = table name = oc_group_user tbl_name = oc_group_user rootpage = 23 sql = CREATE TABLE "oc_group_user" ("gid" VARCHAR(64) DEFAULT '' NOT NULL, "uid" VARCHAR(64) DEFAULT '' NOT NULL, PRIMARY KEY("gid", "uid")) type = index name = sqlite_autoindex_oc_group_user_1 tbl_name = oc_group_user rootpage = 24 sql = type = table name = oc_group_admin tbl_name = oc_group_admin rootpage = 25 sql = CREATE TABLE "oc_group_admin" ("gid" VARCHAR(64) DEFAULT '' NOT NULL, "uid" VARCHAR(64) DEFAULT '' NOT NULL, PRIMARY KEY("gid", "uid")) type = index name = sqlite_autoindex_oc_group_admin_1 tbl_name = oc_group_admin rootpage = 26 sql = type = index name = group_admin_uid tbl_name = oc_group_admin rootpage = 27 sql = CREATE INDEX group_admin_uid ON "oc_group_admin" ("uid") type = table name = oc_groups tbl_name = oc_groups rootpage = 28 sql = CREATE TABLE "oc_groups" ("gid" VARCHAR(64) DEFAULT '' NOT NULL, PRIMARY KEY("gid")) type = index name = sqlite_autoindex_oc_groups_1 tbl_name = oc_groups rootpage = 29 sql = type = table name = oc_locks tbl_name = oc_locks rootpage = 31 sql = CREATE TABLE "oc_locks" ("id" INTEGER NOT NULL, "userid" VARCHAR(64) DEFAULT NULL, "owner" VARCHAR(100) DEFAULT NULL, "timeout" INTEGER DEFAULT NULL, "created" INTEGER DEFAULT NULL, "token" VARCHAR(100) DEFAULT NULL, "scope" INTEGER DEFAULT NULL, "depth" INTEGER DEFAULT NULL, "uri" CLOB DEFAULT NULL, PRIMARY KEY("id")) type = table name = oc_preferences tbl_name = oc_preferences rootpage = 32 sql = CREATE TABLE "oc_preferences" ("userid" VARCHAR(64) DEFAULT '' NOT NULL, "appid" VARCHAR(32) DEFAULT '' NOT NULL, "configkey" VARCHAR(64) DEFAULT '' NOT NULL, "configvalue" CLOB DEFAULT NULL, PRIMARY KEY("userid", "appid", "configkey")) type = index name = sqlite_autoindex_oc_preferences_1 tbl_name = oc_preferences rootpage = 33 sql = type = table name = oc_properties tbl_name = oc_properties rootpage = 34 sql = CREATE TABLE "oc_properties" ("id" INTEGER NOT NULL, "userid" VARCHAR(64) DEFAULT '' NOT NULL, "propertypath" VARCHAR(255) DEFAULT '' NOT NULL, "propertyname" VARCHAR(255) DEFAULT '' NOT NULL, "propertyvalue" VARCHAR(255) NOT NULL, PRIMARY KEY("id")) type = index name = property_index tbl_name = oc_properties rootpage = 36 sql = CREATE INDEX property_index ON "oc_properties" ("userid") type = table name = oc_share tbl_name = oc_share rootpage = 37 sql = CREATE TABLE "oc_share" ("id" INTEGER NOT NULL, "share_type" INTEGER DEFAULT '0' NOT NULL, "share_with" VARCHAR(255) DEFAULT NULL, "uid_owner" VARCHAR(255) DEFAULT '' NOT NULL, "parent" INTEGER DEFAULT NULL, "item_type" VARCHAR(64) DEFAULT '' NOT NULL, "item_source" VARCHAR(255) DEFAULT NULL, "item_target" VARCHAR(255) DEFAULT NULL, "file_source" INTEGER DEFAULT NULL, "file_target" VARCHAR(512) DEFAULT NULL, "permissions" INTEGER DEFAULT '0' NOT NULL, "stime" INTEGER DEFAULT '0' NOT NULL, "accepted" INTEGER DEFAULT '0' NOT NULL, "expiration" DATETIME DEFAULT NULL, "token" VARCHAR(32) DEFAULT NULL, "mail_send" INTEGER DEFAULT '0' NOT NULL, PRIMARY KEY("id")) type = index name = item_share_type_index tbl_name = oc_share rootpage = 39 sql = CREATE INDEX item_share_type_index ON "oc_share" ("item_type", "share_type") type = index name = file_source_index tbl_name = oc_share rootpage = 40 sql = CREATE INDEX file_source_index ON "oc_share" ("file_source") type = index name = token_index tbl_name = oc_share rootpage = 41 sql = CREATE INDEX token_index ON "oc_share" ("token") type = table name = oc_jobs tbl_name = oc_jobs rootpage = 42 sql = CREATE TABLE "oc_jobs" ("id" INTEGER NOT NULL, "class" VARCHAR(255) DEFAULT '' NOT NULL, "argument" VARCHAR(256) DEFAULT '' NOT NULL, "last_run" INTEGER DEFAULT 0, PRIMARY KEY("id")) type = index name = job_class_index tbl_name = oc_jobs rootpage = 44 sql = CREATE INDEX job_class_index ON "oc_jobs" ("class") type = table name = oc_users tbl_name = oc_users rootpage = 45 sql = CREATE TABLE "oc_users" ("uid" VARCHAR(64) DEFAULT '' NOT NULL, "displayname" VARCHAR(64) DEFAULT NULL, "password" VARCHAR(255) DEFAULT '' NOT NULL, PRIMARY KEY("uid")) type = index name = sqlite_autoindex_oc_users_1 tbl_name = oc_users rootpage = 46 sql = type = table name = oc_vcategory tbl_name = oc_vcategory rootpage = 47 sql = CREATE TABLE "oc_vcategory" ("id" INTEGER NOT NULL, "uid" VARCHAR(64) DEFAULT '' NOT NULL, "type" VARCHAR(64) DEFAULT '' NOT NULL, "category" VARCHAR(255) DEFAULT '' NOT NULL, PRIMARY KEY("id")) type = index name = uid_index tbl_name = oc_vcategory rootpage = 48 sql = CREATE INDEX uid_index ON "oc_vcategory" ("uid") type = index name = type_index tbl_name = oc_vcategory rootpage = 49 sql = CREATE INDEX type_index ON "oc_vcategory" ("type") type = index name = category_index tbl_name = oc_vcategory rootpage = 50 sql = CREATE INDEX category_index ON "oc_vcategory" ("category") type = table name = oc_vcategory_to_object tbl_name = oc_vcategory_to_object rootpage = 52 sql = CREATE TABLE "oc_vcategory_to_object" ("objid" INTEGER DEFAULT 0 NOT NULL, "categoryid" INTEGER DEFAULT 0 NOT NULL, "type" VARCHAR(64) DEFAULT '' NOT NULL, PRIMARY KEY("categoryid", "objid", "type")) type = index name = sqlite_autoindex_oc_vcategory_to_object_1 tbl_name = oc_vcategory_to_object rootpage = 53 sql = type = index name = vcategory_objectd_index tbl_name = oc_vcategory_to_object rootpage = 54 sql = CREATE INDEX vcategory_objectd_index ON "oc_vcategory_to_object" ("objid", "type") type = table name = oc_privatedata tbl_name = oc_privatedata rootpage = 55 sql = CREATE TABLE "oc_privatedata" ("keyid" INTEGER NOT NULL, "user" VARCHAR(255) DEFAULT '' NOT NULL, "app" VARCHAR(255) DEFAULT '' NOT NULL, "key" VARCHAR(255) DEFAULT '' NOT NULL, "value" VARCHAR(255) DEFAULT '' NOT NULL, PRIMARY KEY("keyid")) type = table name = oc_documents_session tbl_name = oc_documents_session rootpage = 56 sql = CREATE TABLE "oc_documents_session" ("es_id" VARCHAR(64) NOT NULL, "genesis_url" VARCHAR(512) NOT NULL, "genesis_hash" VARCHAR(128) NOT NULL, "file_id" VARCHAR(512) NOT NULL, "owner" VARCHAR(64) NOT NULL, PRIMARY KEY("es_id")) type = index name = sqlite_autoindex_oc_documents_session_1 tbl_name = oc_documents_session rootpage = 57 sql = type = table name = oc_documents_member tbl_name = oc_documents_member rootpage = 59 sql = CREATE TABLE "oc_documents_member" ("member_id" INTEGER NOT NULL, "es_id" VARCHAR(64) NOT NULL, "uid" VARCHAR(64) NOT NULL, "color" VARCHAR(32) NOT NULL, "last_activity" INTEGER NOT NULL, "is_guest" INTEGER DEFAULT '0' NOT NULL, "token" VARCHAR(32) DEFAULT NULL, "status" INTEGER DEFAULT '1' NOT NULL, PRIMARY KEY("member_id")) type = table name = oc_documents_op tbl_name = oc_documents_op rootpage = 60 sql = CREATE TABLE "oc_documents_op" ("seq" INTEGER NOT NULL, "es_id" VARCHAR(64) NOT NULL, "member" INTEGER DEFAULT 1 NOT NULL, "opspec" CLOB DEFAULT NULL, PRIMARY KEY("seq")) type = index name = documents_op_eis_idx tbl_name = oc_documents_op rootpage = 61 sql = CREATE UNIQUE INDEX documents_op_eis_idx ON "oc_documents_op" ("es_id", "seq") type = table name = oc_documents_invite tbl_name = oc_documents_invite rootpage = 63 sql = CREATE TABLE "oc_documents_invite" ("es_id" VARCHAR(64) NOT NULL, "uid" VARCHAR(64) NOT NULL, "status" INTEGER DEFAULT '0', "sent_on" INTEGER DEFAULT 0) type = table name = oc_documents_revisions tbl_name = oc_documents_revisions rootpage = 64 sql = CREATE TABLE "oc_documents_revisions" ("es_id" VARCHAR(64) NOT NULL, "seq_head" INTEGER NOT NULL, "member_id" INTEGER NOT NULL, "file_id" VARCHAR(512) NOT NULL, "save_hash" VARCHAR(128) NOT NULL) type = index name = documents_rev_eis_idx tbl_name = oc_documents_revisions rootpage = 65 sql = CREATE UNIQUE INDEX documents_rev_eis_idx ON "oc_documents_revisions" ("es_id", "seq_head") type = table name = oc_files_versions tbl_name = oc_files_versions rootpage = 66 sql = CREATE TABLE "oc_files_versions" ("user" VARCHAR(64) DEFAULT '' NOT NULL, "size" VARCHAR(50) DEFAULT '' NOT NULL) type = table name = oc_pictures_images_cache tbl_name = oc_pictures_images_cache rootpage = 67 sql = CREATE TABLE "oc_pictures_images_cache" ("uid_owner" VARCHAR(64) NOT NULL, "path" VARCHAR(256) NOT NULL, "width" INTEGER NOT NULL, "height" INTEGER NOT NULL) type = table name = oc_gallery_sharing tbl_name = oc_gallery_sharing rootpage = 69 sql = CREATE TABLE "oc_gallery_sharing" ("token" VARCHAR(64) NOT NULL, "gallery_id" INTEGER DEFAULT 0 NOT NULL, "recursive" INTEGER NOT NULL) type = table name = oc_clndr_objects tbl_name = oc_clndr_objects rootpage = 72 sql = CREATE TABLE "oc_clndr_objects" ("id" INTEGER NOT NULL, "calendarid" INTEGER DEFAULT 0 NOT NULL, "objecttype" VARCHAR(40) DEFAULT '' NOT NULL, "startdate" DATETIME DEFAULT '1970-01-01 00:00:00', "enddate" DATETIME DEFAULT '1970-01-01 00:00:00', "repeating" INTEGER DEFAULT 0, "summary" VARCHAR(255) DEFAULT NULL, "calendardata" CLOB DEFAULT NULL, "uri" VARCHAR(255) DEFAULT NULL, "lastmodified" INTEGER DEFAULT 0, PRIMARY KEY("id")) type = table name = oc_clndr_calendars tbl_name = oc_clndr_calendars rootpage = 73 sql = CREATE TABLE "oc_clndr_calendars" ("id" INTEGER NOT NULL, "userid" VARCHAR(255) DEFAULT NULL, "displayname" VARCHAR(100) DEFAULT NULL, "uri" VARCHAR(255) DEFAULT NULL, "active" INTEGER DEFAULT 1 NOT NULL, "ctag" INTEGER DEFAULT 0 NOT NULL, "calendarorder" INTEGER DEFAULT 0 NOT NULL, "calendarcolor" VARCHAR(10) DEFAULT NULL, "timezone" CLOB DEFAULT NULL, "components" VARCHAR(100) DEFAULT NULL, PRIMARY KEY("id")) type = table name = oc_clndr_share_event tbl_name = oc_clndr_share_event rootpage = 75 sql = CREATE TABLE "oc_clndr_share_event" ("owner" VARCHAR(255) NOT NULL, "share" VARCHAR(255) NOT NULL, "sharetype" VARCHAR(6) NOT NULL, "eventid" INTEGER DEFAULT '0' NOT NULL, "permissions" INTEGER NOT NULL) type = table name = oc_clndr_share_calendar tbl_name = oc_clndr_share_calendar rootpage = 76 sql = CREATE TABLE "oc_clndr_share_calendar" ("owner" VARCHAR(255) NOT NULL, "share" VARCHAR(255) NOT NULL, "sharetype" VARCHAR(6) NOT NULL, "calendarid" INTEGER DEFAULT '0' NOT NULL, "permissions" INTEGER NOT NULL, "active" INTEGER DEFAULT 1 NOT NULL) type = table name = oc_clndr_repeat tbl_name = oc_clndr_repeat rootpage = 78 sql = CREATE TABLE "oc_clndr_repeat" ("id" INTEGER NOT NULL, "eventid" INTEGER DEFAULT 0 NOT NULL, "calid" INTEGER DEFAULT 0 NOT NULL, "startdate" DATETIME DEFAULT '1970-01-01 00:00:00', "enddate" DATETIME DEFAULT '1970-01-01 00:00:00', PRIMARY KEY("id")) type = table name = oc_files_trash tbl_name = oc_files_trash rootpage = 81 sql = CREATE TABLE "oc_files_trash" ("id" VARCHAR(250) DEFAULT '' NOT NULL, "user" VARCHAR(64) DEFAULT '' NOT NULL, "timestamp" VARCHAR(12) DEFAULT '' NOT NULL, "location" VARCHAR(512) DEFAULT '' NOT NULL, "type" VARCHAR(4) DEFAULT '' NOT NULL, "mime" VARCHAR(255) DEFAULT '' NOT NULL) type = index name = id_index tbl_name = oc_files_trash rootpage = 82 sql = CREATE INDEX id_index ON "oc_files_trash" ("id") type = index name = timestamp_index tbl_name = oc_files_trash rootpage = 84 sql = CREATE INDEX timestamp_index ON "oc_files_trash" ("timestamp") type = index name = user_index tbl_name = oc_files_trash rootpage = 85 sql = CREATE INDEX user_index ON "oc_files_trash" ("user") type = table name = oc_files_trashsize tbl_name = oc_files_trashsize rootpage = 86 sql = CREATE TABLE "oc_files_trashsize" ("user" VARCHAR(64) DEFAULT '' NOT NULL, "size" VARCHAR(50) DEFAULT '' NOT NULL) type = table name = oc_lucene_status tbl_name = oc_lucene_status rootpage = 87 sql = CREATE TABLE "oc_lucene_status" ("fileid" INTEGER DEFAULT 0 NOT NULL, "status" VARCHAR(1) DEFAULT NULL, PRIMARY KEY("fileid")) type = index name = status_index tbl_name = oc_lucene_status rootpage = 88 sql = CREATE INDEX status_index ON "oc_lucene_status" ("status") type = table name = oc_activity tbl_name = oc_activity rootpage = 89 sql = CREATE TABLE "oc_activity" ("activity_id" INTEGER NOT NULL, "timestamp" INTEGER DEFAULT 0 NOT NULL, "priority" INTEGER DEFAULT 0 NOT NULL, "type" INTEGER DEFAULT 0 NOT NULL, "user" VARCHAR(255) NOT NULL, "affecteduser" VARCHAR(255) NOT NULL, "app" VARCHAR(255) NOT NULL, "subject" VARCHAR(255) NOT NULL, "subjectparams" VARCHAR(255) NOT NULL, "message" VARCHAR(255) DEFAULT NULL, "messageparams" VARCHAR(255) DEFAULT NULL, "file" VARCHAR(255) DEFAULT NULL, "link" VARCHAR(255) DEFAULT NULL, PRIMARY KEY("activity_id")) type = table name = oc_contacts_addressbooks tbl_name = oc_contacts_addressbooks rootpage = 92 sql = CREATE TABLE "oc_contacts_addressbooks" ("id" INTEGER NOT NULL, "userid" VARCHAR(255) DEFAULT '' NOT NULL, "displayname" VARCHAR(255) DEFAULT NULL, "uri" VARCHAR(200) DEFAULT NULL, "description" VARCHAR(255) DEFAULT NULL, "ctag" INTEGER DEFAULT 1 NOT NULL, "active" INTEGER DEFAULT 1 NOT NULL, PRIMARY KEY("id")) type = table name = oc_contacts_cards tbl_name = oc_contacts_cards rootpage = 93 sql = CREATE TABLE "oc_contacts_cards" ("id" INTEGER NOT NULL, "addressbookid" INTEGER DEFAULT 0 NOT NULL, "fullname" VARCHAR(255) DEFAULT NULL, "carddata" CLOB DEFAULT NULL, "uri" VARCHAR(200) DEFAULT NULL, "lastmodified" INTEGER DEFAULT 0, PRIMARY KEY("id")) type = table name = oc_contacts_cards_properties tbl_name = oc_contacts_cards_properties rootpage = 95 sql = CREATE TABLE "oc_contacts_cards_properties" ("id" INTEGER NOT NULL, "userid" VARCHAR(255) DEFAULT '' NOT NULL, "contactid" INTEGER DEFAULT 0 NOT NULL, "name" VARCHAR(64) DEFAULT NULL, "value" VARCHAR(255) DEFAULT NULL, "preferred" INTEGER DEFAULT 1 NOT NULL, PRIMARY KEY("id")) type = index name = cp_name_index tbl_name = oc_contacts_cards_properties rootpage = 96 sql = CREATE INDEX cp_name_index ON "oc_contacts_cards_properties" ("name") type = index name = cp_value_index tbl_name = oc_contacts_cards_properties rootpage = 97 sql = CREATE INDEX cp_value_index ON "oc_contacts_cards_properties" ("value")
コメントをかく