2015_04_20_151900_create_uploads_table_zgldh.php 918 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. use Illuminate\Database\Schema\Blueprint;
  3. use Illuminate\Database\Migrations\Migration;
  4. class CreateUploadsTableZgldh extends Migration
  5. {
  6. /**
  7. * Run the migrations.
  8. *
  9. * @return void
  10. */
  11. public function up()
  12. {
  13. if (!Schema::hasTable('uploads')) {
  14. Schema::create('uploads', function (Blueprint $table) {
  15. $table->increments('id');
  16. $table->string('name')->nullable();
  17. $table->string('description')->nullable();
  18. $table->string('disk');
  19. $table->string('path');
  20. $table->integer('size');
  21. $table->integer('user_id')->nullable();
  22. $table->timestamps();
  23. });
  24. }
  25. }
  26. /**
  27. * Reverse the migrations.
  28. *
  29. * @return void
  30. */
  31. public function down()
  32. {
  33. Schema::dropIfExists('uploads');
  34. }
  35. }