NASER add task functions
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
public function up()
|
||||
{
|
||||
Schema::create('rich_texts', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->morphs('record');
|
||||
$table->string('field');
|
||||
$table->longText('body')->nullable();
|
||||
$table->timestamps();
|
||||
|
||||
$table->unique(['field', 'record_type', 'record_id']);
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('rich_texts');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
<?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::create('task_comments', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('task_id');
|
||||
$table->unsignedBigInteger('user_id');
|
||||
$table->text('body');
|
||||
$table->json('mentioned_user_ids')->nullable();
|
||||
$table->timestamps();
|
||||
|
||||
$table->index(['task_id', 'created_at']);
|
||||
$table->index(['user_id', 'created_at']);
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('task_comments');
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user