add duration

This commit is contained in:
Romulus21 committed 2024-02-15 23:09:13 +01:00
1 parent b326f79f2d
commit 335fc8b12b
5 files changed
+42 -3

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
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('to_dos', function (Blueprint $table) {
$table->unsignedInteger('duration')->default(0)->after('description');
$table->unsignedInteger('position')->default(0)->after('description');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('to_dos', function (Blueprint $table) {
$table->dropColumn('position');
$table->dropColumn('duration');
});
}
};