fix: migration history
This commit is contained in:
parent
9b5158dec2
commit
b52e2de987
|
|
@ -123,6 +123,7 @@ return new class extends Migration
|
||||||
});
|
});
|
||||||
|
|
||||||
Schema::table('account_balances', function (Blueprint $table) {
|
Schema::table('account_balances', function (Blueprint $table) {
|
||||||
|
$table->dropUnique('account_balances_account_id_balance_date_unique');
|
||||||
$table->dropColumn('account_id');
|
$table->dropColumn('account_id');
|
||||||
});
|
});
|
||||||
Schema::table('account_balances', function (Blueprint $table) {
|
Schema::table('account_balances', function (Blueprint $table) {
|
||||||
|
|
|
||||||
|
|
@ -12,9 +12,6 @@ return new class extends Migration
|
||||||
public function up(): void
|
public function up(): void
|
||||||
{
|
{
|
||||||
Schema::table('account_balances', function (Blueprint $table) {
|
Schema::table('account_balances', function (Blueprint $table) {
|
||||||
// Drop the broken index
|
|
||||||
$table->dropUnique('account_balances_account_id_balance_date_unique');
|
|
||||||
|
|
||||||
// Recreate it properly
|
// Recreate it properly
|
||||||
$table->unique(['account_id', 'balance_date'], 'account_balances_account_id_balance_date_unique');
|
$table->unique(['account_id', 'balance_date'], 'account_balances_account_id_balance_date_unique');
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue