Files
approagency/database/migrations/2025_08_01_222751_create_reminders_table.php
T
2025-09-10 15:28:46 +03:30

37 lines
1.1 KiB
PHP

<?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('reminders', function (Blueprint $table) {
$table->id();
$table->foreignId('package_name_id')->constrained('package_names')->onDelete('CASCADE');
$table->foreignId('user_id')->constrained('users')->onDelete('CASCADE');
$table->string('title');
$table->string('description')->nullable();
$table->json('data')->nullable();
$table->boolean('repeatable')->default(false);
$table->timestamp('time');
$table->unsignedMediumInteger('repeat_days')->nullable();
$table->timestamp('last_repeat')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('reminders');
}
};