add duration

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

View File

@@ -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');
});
}
};