Code Duplication    Length = 28-32 lines in 2 locations

lib/Migration/Version0019Date20200603080001.php 2 locations

@@ 179-210 (lines=32) @@
176
//		}
177
178
179
		if (!$schema->hasTable('circle_groups')) {
180
			$table = $schema->createTable('circle_groups');
181
			$table->addColumn(
182
				'circle_id', 'string', [
183
							   'notnull' => true,
184
							   'length'  => 15,
185
						   ]
186
			);
187
			$table->addColumn(
188
				'group_id', 'string', [
189
							  'notnull' => true,
190
							  'length'  => 64,
191
						  ]
192
			);
193
			$table->addColumn(
194
				'level', 'smallint', [
195
						   'notnull' => true,
196
						   'length'  => 1,
197
					   ]
198
			);
199
			$table->addColumn(
200
				'note', 'text', [
201
						  'notnull' => false
202
					  ]
203
			);
204
			$table->addColumn(
205
				'joined', 'datetime', [
206
							'notnull' => false,
207
						]
208
			);
209
			$table->setPrimaryKey(['circle_id', 'group_id']);
210
		}
211
212
213
		if (!$schema->hasTable('circle_gsevents')) {
@@ 310-337 (lines=28) @@
307
		}
308
309
310
		if (!$schema->hasTable('circle_gsshares_mp')) {
311
			$table = $schema->createTable('circle_gsshares_mp');
312
			$table->addColumn(
313
				'share_id', 'integer', [
314
							  'length'  => 11,
315
							  'notnull' => false
316
						  ]
317
			);
318
			$table->addColumn(
319
				'user_id', 'string', [
320
							 'length'  => 127,
321
							 'notnull' => false
322
						 ]
323
			);
324
			$table->addColumn(
325
				'mountpoint', 'text', [
326
								'notnull' => false
327
							]
328
			);
329
			$table->addColumn(
330
				'mountpoint_hash', 'string', [
331
									 'length'  => 64,
332
									 'notnull' => false
333
								 ]
334
			);
335
			$table->setPrimaryKey(['share_id', 'user_id']);
336
			$table->addUniqueIndex(['share_id', 'mountpoint_hash']);
337
		}
338
339
340