multiple analysis on same parts
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class DropUniqPartAnalysisIndex extends AbstractMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
$this->table('identification_parts_analyses')
|
||||
->removeIndexByName('uniq_part_analysis')
|
||||
->update();
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
$this->table('identification_parts_analyses')
|
||||
->addIndex(['part_id', 'analysis_recordkey'], [
|
||||
'unique' => true,
|
||||
'name' => 'uniq_part_analysis',
|
||||
])
|
||||
->update();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user