Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2021-02-15 12:36:14 +01:00
Родитель ebf65dcc5b
Коммит 3d9694125f
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 7076EA9751AACDDA
2 изменённых файлов: 5 добавлений и 22 удалений

Просмотреть файл

@ -28,19 +28,10 @@ namespace OCA\Talk\Migration;
use Closure;
use Doctrine\DBAL\Types\Types;
use OCP\DB\ISchemaWrapper;
use OCP\IDBConnection;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
class Version11000Date20201209142525 extends SimpleMigrationStep {
/** @var IDBConnection */
protected $connection;
public function __construct(IDBConnection $connection) {
$this->connection = $connection;
}
/**
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
@ -109,17 +100,4 @@ class Version11000Date20201209142525 extends SimpleMigrationStep {
return $changedSchema ? $schema : null;
}
/**
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
*/
public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options): void {
/**
* Table is dropped in favor of talk_attendees::display_name
* We can't link the data to a room and therefor create a related
* attendee, so unluckily it makes no sense to take over the data
*/
}
}

Просмотреть файл

@ -41,6 +41,11 @@ class Version11001Date20210212105406 extends SimpleMigrationStep {
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
/** @var ISchemaWrapper $schema */
$schema = $schemaClosure();
/**
* Table is dropped in favor of talk_attendees::display_name
* We can't link the data to a room and therefor create a related
* attendee, so unluckily it makes no sense to take over the data
*/
if ($schema->hasTable('talk_guestnames')) {
$schema->dropTable('talk_guestnames');
return $schema;