Skip to content

Commit

Permalink
Merge pull request #284 from ECFMP/remove-unique-index-for-flow-measures
Browse files Browse the repository at this point in the history
Drop unique index for flow measure identifiers
  • Loading branch information
AndyTWF authored Oct 17, 2022
2 parents 6841d49 + fa00ef3 commit ecd2bc5
Showing 1 changed file with 34 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class () extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('flow_measures', function (Blueprint $table) {
$indexes = Schema::getConnection()->getDoctrineSchemaManager()->listTableIndexes('flow_measures');
if (array_key_exists('flow_measures_identifier_unique', $indexes)) {
$table->dropUnique('flow_measures_identifier_unique');
}

$table->index('identifier');
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
};

0 comments on commit ecd2bc5

Please sign in to comment.