]> source.dussan.org Git - nextcloud-server.git/commitdiff
Comment legacy file_metadata table migrations 42108/head
authorLouis Chemineau <louis@chmn.me>
Thu, 7 Dec 2023 12:31:09 +0000 (13:31 +0100)
committerLouis <louis@chmn.me>
Wed, 13 Dec 2023 09:43:54 +0000 (10:43 +0100)
Signed-off-by: Louis Chemineau <louis@chmn.me>
core/Migrations/Version24000Date20220404230027.php
core/Migrations/Version27000Date20230309104325.php
core/Migrations/Version27000Date20230309104802.php

index 26af9a4c6cc37414ea73a6f7bdad5686d3d67953..114fc27b899fd5bb1a534445a502c122124c8127 100644 (file)
@@ -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;
        }
index 4708dc33717712b6ae78ce2bbaf5a1e5cebd5ca2..53852731c0d7124b75d86152d47e78462539c8e8 100644 (file)
@@ -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();
        }
 }
index 4bd50fe03962ce27a3d37204c5d6ae8b39e71dc4..260ae83d9708bb40122d2e15a46e288bcc64b078 100644 (file)
@@ -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;
        }