hasTable('notes')) { Capsule::schema()->create('notes', function (Blueprint $table) { $table->id('notes_id'); $table->unsignedBigInteger('notes_idbus')->nullable(); $table->unsignedBigInteger('notes_iduser')->nullable(); $table->string('notes_title'); $table->text('notes_content')->nullable(); $table->enum('notes_type', ['note', 'link'])->default('note'); $table->string('notes_url')->nullable(); $table->boolean('notes_is_pinned')->default(false); $table->string('notes_color')->default('#ffffff'); $table->timestamps(); $table->index('notes_idbus'); $table->index('notes_iduser'); $table->index('notes_type'); }); } } /** * Reverse the migrations. * * @return void */ public function down(): void { Capsule::schema()->dropIfExists('notes'); } }