You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.7 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. return new class extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('collections', function (Blueprint $table) {
  15. $table->id();
  16. $table->string("name")->nullable()->unique();
  17. $table->string("path")->nullable();
  18. $table->boolean("public")->nullable();
  19. $table->string("disk")->nullable();
  20. $table->integer("count")->nullable();
  21. $table->boolean("tmp_support")->nullable();
  22. $table->time("remove_tmp_time")->nullable();
  23. $table->integer("max_file_size")->nullable();
  24. $table->integer("min_file_size")->nullable();
  25. $table->integer("max_width")->nullable();
  26. $table->integer("min_width")->nullable();
  27. $table->integer("max_height")->nullable();
  28. $table->integer("min_height")->nullable();
  29. $table->boolean("alt_required")->nullable();
  30. $table->boolean("description_required")->nullable();
  31. $table->json("exts")->nullable();
  32. $table->string("ext")->nullable();
  33. $table->json('image_processor')->nullable();
  34. $table->json("mimetypes")->nullable();
  35. $table->string("model")->unique()->nullable();
  36. $table->time("expire_date")->nullable();
  37. $table->timestamps();
  38. $table->softDeletes();
  39. });
  40. }
  41. /**
  42. * Reverse the migrations.
  43. *
  44. * @return void
  45. */
  46. public function down()
  47. {
  48. Schema::dropIfExists('collections');
  49. }
  50. };