Skip to content

Commit

Permalink
fix drop index order (#315)
Browse files Browse the repository at this point in the history
  • Loading branch information
mckenziearts authored Jan 8, 2025
1 parent 5e52d1f commit a8f91b4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function up(): void
Schema::create($this->getTableName('product_variants'), function (Blueprint $table): void {
$this->addCommonFields($table);

$table->string('name');
$table->string('name')->index();
$table->string('sku')->unique()->nullable();
$table->string('barcode')->unique()->nullable();
$table->string('ean')->unique()->nullable();
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/Helpers/Migration.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ public function addForeignKey(Blueprint $table, string $column, string $tableNam

public function removeForeignKeyAndColumn(Blueprint $table, string $column): void
{
$table->dropIndex([$column]);
$table->dropForeign([$column]);
$table->dropIndex([$column]);
$table->dropColumn($column);
}
}

0 comments on commit a8f91b4

Please sign in to comment.