add habit back

This commit is contained in:
2025-11-13 14:06:21 +03:00
parent 0917c2696b
commit 9452d40149
9 changed files with 308 additions and 3 deletions

View File

@@ -0,0 +1,33 @@
<?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::create('habits', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->text('description');
$table->integer('target_count');
$table->integer('current_count');
$table->jsonb('completions')->default('[]');
$table->boolean('is_completed')->default(false);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('habits');
}
};