fix: force boolean columns to be false

This commit is contained in:
hackerESQ
2025-01-24 19:15:28 -06:00
parent b3f0f89d16
commit cc447c5fb0
2 changed files with 3 additions and 3 deletions
@@ -23,7 +23,7 @@ class CreateTransactionsTable extends Migration
$table->float('quantity', 12, 4);
$table->float('cost_basis', 12, 4);
$table->float('sale_price', 12, 4)->nullable();
$table->boolean('split')->nullable();
$table->boolean('split')->default(false);
$table->date('date');
$table->timestamps();
});
@@ -12,11 +12,11 @@ return new class extends Migration
public function up(): void
{
Schema::table('holdings', function (Blueprint $table) {
$table->boolean('reinvest_dividends')->nullable()->after('quantity');
$table->boolean('reinvest_dividends')->default(false)->after('quantity');
});
Schema::table('transactions', function (Blueprint $table) {
$table->boolean('reinvested_dividend')->nullable()->after('split');
$table->boolean('reinvested_dividend')->default(false)->after('split');
});
}