26 lines
597 B
PHP
26 lines
597 B
PHP
<?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();
|
|
}
|
|
}
|