Code Duplication    Length = 12-13 lines in 3 locations

core/Migrations/Version13000Date20170718121200.php 2 locations

@@ 658-669 (lines=12) @@
655
			$table->addUniqueIndex(['objecttype', 'objectid', 'systemtagid'], 'mapping');
656
		}
657
658
		if (!$schema->hasTable('systemtag_group')) {
659
			$table = $schema->createTable('systemtag_group');
660
			$table->addColumn('systemtagid', 'integer', [
661
				'notnull' => true,
662
				'length' => 4,
663
				'default' => 0,
664
			]);
665
			$table->addColumn('gid', 'string', [
666
				'notnull' => true,
667
			]);
668
			$table->setPrimaryKey(['gid', 'systemtagid']);
669
		}
670
671
		if (!$schema->hasTable('file_locks')) {
672
			$table = $schema->createTable('file_locks');
@@ 892-904 (lines=13) @@
889
			$table->addIndex(['section'], 'personal_settings_section');
890
		}
891
892
		if (!$schema->hasTable('accounts')) {
893
			$table = $schema->createTable('accounts');
894
			$table->addColumn('uid', 'string', [
895
				'notnull' => true,
896
				'length' => 64,
897
				'default' => '',
898
			]);
899
			$table->addColumn('data', 'text', [
900
				'notnull' => true,
901
				'default' => '',
902
			]);
903
			$table->setPrimaryKey(['uid']);
904
		}
905
		return $schema;
906
	}
907

core/Migrations/Version13000Date20170814074715.php 1 location

@@ 53-65 (lines=13) @@
50
		$schema = $schemaClosure();
51
52
53
		if (!$schema->hasTable('accounts')) {
54
			$table = $schema->createTable('accounts');
55
			$table->addColumn('uid', 'string', [
56
				'notnull' => true,
57
				'length' => 64,
58
				'default' => '',
59
			]);
60
			$table->addColumn('data', 'text', [
61
				'notnull' => true,
62
				'default' => '',
63
			]);
64
			$table->setPrimaryKey(['uid']);
65
		}
66
67
		return $schema;
68
	}