Code Duplication    Length = 12-17 lines in 2 locations

core/Migrations/Version14000Date20180710092004.php 1 location

@@ 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

core/Migrations/Version14000Date20180712153140.php 1 location

@@ 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