| @@ 32-48 (lines=17) @@ | ||
| 29 | use OCP\Migration\SimpleMigrationStep; |
|
| 30 | use OCP\Migration\IOutput; |
|
| 31 | ||
| 32 | class Version14000Date20180710092004 extends SimpleMigrationStep { |
|
| 33 | ||
| 34 | public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { |
|
| 35 | /** @var ISchemaWrapper $schema */ |
|
| 36 | $schema = $schemaClosure(); |
|
| 37 | ||
| 38 | $table = $schema->getTable('share'); |
|
| 39 | ||
| 40 | if (!$table->hasColumn('password_by_talk')) { |
|
| 41 | $table->addColumn('password_by_talk', Type::BOOLEAN, [ |
|
| 42 | 'default' => 0, |
|
| 43 | ]); |
|
| 44 | } |
|
| 45 | ||
| 46 | return $schema; |
|
| 47 | } |
|
| 48 | } |
|
| 49 | ||
| @@ 32-43 (lines=12) @@ | ||
| 29 | * |
|
| 30 | * Class Version14000Date20180712153140 |
|
| 31 | */ |
|
| 32 | class Version14000Date20180712153140 extends SimpleMigrationStep { |
|
| 33 | public function changeSchema(\OCP\Migration\IOutput $output, \Closure $schemaClosure, array $options) { |
|
| 34 | ||
| 35 | /** @var ISchemaWrapper $schema */ |
|
| 36 | $schema = $schemaClosure(); |
|
| 37 | ||
| 38 | $table = $schema->getTable('share'); |
|
| 39 | $table->addColumn('note', 'text', ['notnull' => false]); |
|
| 40 | ||
| 41 | return $schema; |
|
| 42 | } |
|
| 43 | } |
|
| 44 | ||
| @@ 32-53 (lines=22) @@ | ||
| 29 | use OCP\Migration\SimpleMigrationStep; |
|
| 30 | use OCP\Migration\IOutput; |
|
| 31 | ||
| 32 | class Version15000Date20180926101451 extends SimpleMigrationStep { |
|
| 33 | ||
| 34 | /** |
|
| 35 | * @param IOutput $output |
|
| 36 | * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
| 37 | * @param array $options |
|
| 38 | * @return null|ISchemaWrapper |
|
| 39 | */ |
|
| 40 | public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { |
|
| 41 | /** @var ISchemaWrapper $schema */ |
|
| 42 | $schema = $schemaClosure(); |
|
| 43 | ||
| 44 | $table = $schema->getTable('authtoken'); |
|
| 45 | $table->addColumn('password_invalid','boolean', [ |
|
| 46 | 'notnull' => true, |
|
| 47 | 'default' => false, |
|
| 48 | ]); |
|
| 49 | ||
| 50 | return $schema; |
|
| 51 | } |
|
| 52 | ||
| 53 | } |
|
| 54 | ||