Commit 7d333c4d authored by Nikolay Grachev's avatar Nikolay Grachev Committed by dejan0
Browse files

Issue #3264280 by Granik: Error on update from 1.0.0-rc1 to 1.0.0-rc2

parent 5696449c
Loading
Loading
Loading
Loading
+21 −12
Original line number Diff line number Diff line
@@ -21,18 +21,27 @@ function entity_reference_media_update_8001() {

      $schema = Database::getConnection()->schema();

      $schema->addField($table, $field_name . '_default_start_end', [
      $fields_add = [
        $field_name . '_default_start_end' => [
          'type' => 'int',
          'size' => 'tiny'
      ]);
      $schema->addField($table, $field_name . '_video_start', [
        ],
        $field_name . '_video_start' => [
          'type' => 'float',
          'size' => 'normal'
      ]);
      $schema->addField($table, $field_name . '_video_end', [
        ],
        $field_name . '_video_end' => [
          'type' => 'float',
          'size' => 'normal'
      ]);
        ]
      ];

      foreach ($fields_add as $column => $options) {
        if ($schema->fieldExists($table, $column)) {
          continue;
        }
        $schema->addField($table, $column, $options);
      }
    }
  }
}