添加 默认值

This commit is contained in:
iVampireSP.com 2023-01-14 18:14:28 +08:00
parent 08f2fc2306
commit c6d943291a
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132

View File

@ -14,7 +14,7 @@
public function up(): void
{
Schema::table('users', function (Blueprint $table) {
$table->decimal('balance')->change();
$table->decimal('balance')->default(0)->change();
});
}
@ -26,7 +26,7 @@ public function up(): void
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
$table->decimal('balance', 10)->change();
$table->decimal('balance', 10)->default(0)->change();
});
}
};