aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorLouis Chemineau <louis@chmn.me>2023-12-07 13:31:09 +0100
committerLouis <louis@chmn.me>2023-12-13 10:43:54 +0100
commitba44843213e89adcea63d690097b7c82fab887b1 (patch)
tree2b201bd51a1e223531a5420eb9c8bc4076eaefbd /core
parent0fcc88424d264f99c7794d4d256a04ccdb1e0aa3 (diff)
downloadnextcloud-server-ba44843213e89adcea63d690097b7c82fab887b1.tar.gz
nextcloud-server-ba44843213e89adcea63d690097b7c82fab887b1.zip
Comment legacy file_metadata table migrations
Signed-off-by: Louis Chemineau <louis@chmn.me>
Diffstat (limited to 'core')
-rw-r--r--core/Migrations/Version24000Date20220404230027.php36
-rw-r--r--core/Migrations/Version27000Date20230309104325.php43
-rw-r--r--core/Migrations/Version27000Date20230309104802.php14
3 files changed, 47 insertions, 46 deletions
diff --git a/core/Migrations/Version24000Date20220404230027.php b/core/Migrations/Version24000Date20220404230027.php
index 26af9a4c6cc..114fc27b899 100644
--- a/core/Migrations/Version24000Date20220404230027.php
+++ b/core/Migrations/Version24000Date20220404230027.php
@@ -40,26 +40,26 @@ class Version24000Date20220404230027 extends SimpleMigrationStep {
* @return null|ISchemaWrapper
*/
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
- /** @var ISchemaWrapper $schema */
- $schema = $schemaClosure();
+ // /** @var ISchemaWrapper $schema */
+ // $schema = $schemaClosure();
- if (!$schema->hasTable('file_metadata')) {
- $table = $schema->createTable('file_metadata');
- $table->addColumn('id', Types::BIGINT, [
- 'notnull' => true,
- ]);
- $table->addColumn('group_name', Types::STRING, [
- 'notnull' => true,
- 'length' => 50,
- ]);
- $table->addColumn('value', Types::TEXT, [
- 'notnull' => false,
- 'default' => '',
- ]);
- $table->setPrimaryKey(['id', 'group_name'], 'file_metadata_idx');
+ // if (!$schema->hasTable('file_metadata')) {
+ // $table = $schema->createTable('file_metadata');
+ // $table->addColumn('id', Types::BIGINT, [
+ // 'notnull' => true,
+ // ]);
+ // $table->addColumn('group_name', Types::STRING, [
+ // 'notnull' => true,
+ // 'length' => 50,
+ // ]);
+ // $table->addColumn('value', Types::TEXT, [
+ // 'notnull' => false,
+ // 'default' => '',
+ // ]);
+ // $table->setPrimaryKey(['id', 'group_name'], 'file_metadata_idx');
- return $schema;
- }
+ // return $schema;
+ // }
return null;
}
diff --git a/core/Migrations/Version27000Date20230309104325.php b/core/Migrations/Version27000Date20230309104325.php
index 4708dc33717..53852731c0d 100644
--- a/core/Migrations/Version27000Date20230309104325.php
+++ b/core/Migrations/Version27000Date20230309104325.php
@@ -50,19 +50,20 @@ class Version27000Date20230309104325 extends SimpleMigrationStep {
* @return null|ISchemaWrapper
*/
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
- /** @var ISchemaWrapper $schema */
- $schema = $schemaClosure();
- $metadataTable = $schema->getTable('file_metadata');
+ // /** @var ISchemaWrapper $schema */
+ // $schema = $schemaClosure();
+ // $metadataTable = $schema->getTable('file_metadata');
- if ($metadataTable->hasColumn('value')) {
- return null;
- }
+ // if ($metadataTable->hasColumn('value')) {
+ // return null;
+ // }
- $metadataTable->addColumn('value', Types::TEXT, [
- 'notnull' => false,
- 'default' => '',
- ]);
- return $schema;
+ // $metadataTable->addColumn('value', Types::TEXT, [
+ // 'notnull' => false,
+ // 'default' => '',
+ // ]);
+ // return $schema;
+ return null;
}
@@ -74,17 +75,17 @@ class Version27000Date20230309104325 extends SimpleMigrationStep {
*/
public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) {
/** @var ISchemaWrapper $schema */
- $schema = $schemaClosure();
- $metadataTable = $schema->getTable('file_metadata');
+ // $schema = $schemaClosure();
+ // $metadataTable = $schema->getTable('file_metadata');
- if (!$metadataTable->hasColumn('metadata')) {
- return;
- }
+ // if (!$metadataTable->hasColumn('metadata')) {
+ // return;
+ // }
- $this->connection
- ->getQueryBuilder()
- ->update('file_metadata')
- ->set('value', 'metadata')
- ->executeStatement();
+ // $this->connection
+ // ->getQueryBuilder()
+ // ->update('file_metadata')
+ // ->set('value', 'metadata')
+ // ->executeStatement();
}
}
diff --git a/core/Migrations/Version27000Date20230309104802.php b/core/Migrations/Version27000Date20230309104802.php
index 4bd50fe0396..260ae83d970 100644
--- a/core/Migrations/Version27000Date20230309104802.php
+++ b/core/Migrations/Version27000Date20230309104802.php
@@ -43,14 +43,14 @@ class Version27000Date20230309104802 extends SimpleMigrationStep {
* @return null|ISchemaWrapper
*/
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
- /** @var ISchemaWrapper $schema */
- $schema = $schemaClosure();
- $metadataTable = $schema->getTable('file_metadata');
+ // /** @var ISchemaWrapper $schema */
+ // $schema = $schemaClosure();
+ // $metadataTable = $schema->getTable('file_metadata');
- if ($metadataTable->hasColumn('metadata')) {
- $metadataTable->dropColumn('metadata');
- return $schema;
- }
+ // if ($metadataTable->hasColumn('metadata')) {
+ // $metadataTable->dropColumn('metadata');
+ // return $schema;
+ // }
return null;
}