createIfNotExists('images', function (Blueprint $table) { $table->ulid('ulid')->primary(); $table->string('filename', 255); $table->string('original_filename', 255); $table->string('mime_type', 100); $table->bigInteger('file_size'); $table->unsignedInteger('width'); $table->unsignedInteger('height'); $table->string('hash', 255)->unique(); $table->string('path', 500); $table->text('alt_text'); $table->timestamps(); // Indexes $table->unique(['hash'], 'uk_images_hash'); $table->index(['mime_type']); $table->index(['created_at']); // Table options $table->engine('InnoDB'); $table->charset('utf8mb4'); $table->collation('utf8mb4_unicode_ci'); }); $schema->execute(); } public function down(ConnectionInterface $connection): void { $schema = new Schema($connection); $schema->dropIfExists('images'); $schema->execute(); } public function getVersion(): MigrationVersion { return MigrationVersion::fromTimestamp("2024_01_17_000003"); } public function getDescription(): string { return "Create Images Table with Schema Builder"; } }