Browse Source

Fix versioning of migrations

Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/404/head
Joas Schilling 8 years ago
parent
commit
bf36d3002c
No known key found for this signature in database GPG Key ID: E166FD8976B3BAC8
  1. 2
      lib/Migration/Version2000Date20170707093535.php
  2. 14
      lib/Migration/Version2001Date20170707115443.php

2
lib/Migration/Version2000001Date20170707093535.php → lib/Migration/Version2000Date20170707093535.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

14
lib/Migration/Version2001002Date20170707115443.php → lib/Migration/Version2001Date20170707115443.php

@ -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;
}
Loading…
Cancel
Save