fix: migration history

This commit is contained in:
Víctor Falcón 2025-12-29 08:32:31 +01:00
parent 9b5158dec2
commit b52e2de987
2 changed files with 1 additions and 3 deletions

View File

@ -123,6 +123,7 @@ return new class extends Migration
});
Schema::table('account_balances', function (Blueprint $table) {
$table->dropUnique('account_balances_account_id_balance_date_unique');
$table->dropColumn('account_id');
});
Schema::table('account_balances', function (Blueprint $table) {

View File

@ -12,9 +12,6 @@ return new class extends Migration
public function up(): void
{
Schema::table('account_balances', function (Blueprint $table) {
// Drop the broken index
$table->dropUnique('account_balances_account_id_balance_date_unique');
// Recreate it properly
$table->unique(['account_id', 'balance_date'], 'account_balances_account_id_balance_date_unique');
});