| 12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Support\Facades\Schema;
- use App\Database\Migrations\TenantMigration;
- return new class extends TenantMigration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('dashboard_notes', function (Blueprint $table) {
- $table->id();
- $table->string('unique_id')->unique();
- $table->text('text');
- $table->boolean('completed')->default(false);
- $table->unsignedBigInteger('user_id')->nullable();
- $table->timestamps();
- $table->index(['user_id', 'completed', 'created_at']);
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('dashboard_notes');
- }
- };
|