Browse Source
Fix versioning of migrations
Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/404/head
Joas Schilling
8 years ago
No known key found for this signature in database
GPG Key ID: E166FD8976B3BAC8
2 changed files with
9 additions and
7 deletions
-
lib/Migration/Version2000Date20170707093535.php
-
lib/Migration/Version2001Date20170707115443.php
|
|
@ -27,7 +27,7 @@ use Doctrine\DBAL\Types\Type; |
|
|
|
use OCP\Migration\SimpleMigrationStep; |
|
|
|
use OCP\Migration\IOutput; |
|
|
|
|
|
|
|
class Version2000001Date20170707093535 extends SimpleMigrationStep { |
|
|
|
class Version2000Date20170707093535 extends SimpleMigrationStep { |
|
|
|
|
|
|
|
/** |
|
|
|
* @param IOutput $output |
|
|
@ -31,7 +31,7 @@ use OCP\IDBConnection; |
|
|
|
use OCP\Migration\SimpleMigrationStep; |
|
|
|
use OCP\Migration\IOutput; |
|
|
|
|
|
|
|
class Version2001002Date20170707115443 extends SimpleMigrationStep { |
|
|
|
class Version2001Date20170707115443 extends SimpleMigrationStep { |
|
|
|
|
|
|
|
/** @var IDBConnection */ |
|
|
|
protected $db; |
|
|
@ -64,11 +64,13 @@ class Version2001002Date20170707115443 extends SimpleMigrationStep { |
|
|
|
$schema = $schemaClosure(); |
|
|
|
$table = $schema->getTable('spreedme_room_participants'); |
|
|
|
|
|
|
|
$table->addColumn('participantType', Type::SMALLINT, [ |
|
|
|
'notnull' => true, |
|
|
|
'length' => 6, |
|
|
|
'default' => 0, |
|
|
|
]); |
|
|
|
if (!$table->hasColumn('participantType')) { |
|
|
|
$table->addColumn('participantType', Type::SMALLINT, [ |
|
|
|
'notnull' => true, |
|
|
|
'length' => 6, |
|
|
|
'default' => 0, |
|
|
|
]); |
|
|
|
} |
|
|
|
|
|
|
|
return $schema; |
|
|
|
} |