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.

52 lines
1.7 KiB

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->string("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->json("avalible_exts")->nullable();
  33. $table->json("mimetypes")->nullable();
  34. $table->string("model")->unique()->nullable();
  35. $table->time("expire_date")->nullable();
  36. $table->timestamps();
  37. $table->softDeletes();
  38. });
  39. }
  40. /**
  41. * Reverse the migrations.
  42. *
  43. * @return void
  44. */
  45. public function down()
  46. {
  47. Schema::dropIfExists('collections');
  48. }
  49. };