fix: force boolean columns to be false
This commit is contained in:
@@ -23,7 +23,7 @@ class CreateTransactionsTable extends Migration
|
|||||||
$table->float('quantity', 12, 4);
|
$table->float('quantity', 12, 4);
|
||||||
$table->float('cost_basis', 12, 4);
|
$table->float('cost_basis', 12, 4);
|
||||||
$table->float('sale_price', 12, 4)->nullable();
|
$table->float('sale_price', 12, 4)->nullable();
|
||||||
$table->boolean('split')->nullable();
|
$table->boolean('split')->default(false);
|
||||||
$table->date('date');
|
$table->date('date');
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -12,11 +12,11 @@ return new class extends Migration
|
|||||||
public function up(): void
|
public function up(): void
|
||||||
{
|
{
|
||||||
Schema::table('holdings', function (Blueprint $table) {
|
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) {
|
Schema::table('transactions', function (Blueprint $table) {
|
||||||
$table->boolean('reinvested_dividend')->nullable()->after('split');
|
$table->boolean('reinvested_dividend')->default(false)->after('split');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user