increments('id'); $table->unsignedMediumInteger('userid')->default(0); $table->unsignedSmallInteger('width')->default(0); $table->dateTime('added')->nullable(); $table->string('filename')->default(''); $table->char('dlkey', 32)->index(); $table->string('filetype', 50)->default(''); $table->unsignedBigInteger('filesize')->default(0); $table->string('location')->default(''); $table->mediumInteger('downloads')->default(0); $table->smallInteger('isimage')->unsigned()->default(0); $table->smallInteger('thumb')->unsigned()->default(0); $table->index(['userid', 'id'], 'pid'); $table->index(['added', 'isimage', 'downloads'], ); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('attachments'); } }