Add piece_weight calibration: enter Stück + Gramm per delivery, average auto-calculated
Deploy / deploy (push) Successful in 17s
Deploy / deploy (push) Successful in 17s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
38bcf60778
commit
d87383672c
5 files changed
+73
-1
No files matched your search
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('spices', function (Blueprint $table) {
|
||||
$table->decimal('piece_weight', 10, 3)->nullable()->after('unit');
|
||||
});
|
||||
|
||||
Schema::table('spices_suppliers', function (Blueprint $table) {
|
||||
$table->decimal('weight_g', 10, 3)->nullable()->after('amount');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('spices', function (Blueprint $table) {
|
||||
$table->dropColumn('piece_weight');
|
||||
});
|
||||
|
||||
Schema::table('spices_suppliers', function (Blueprint $table) {
|
||||
$table->dropColumn('weight_g');
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user