2021_11_08_144727_create_albums_table.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. use Illuminate\Database\Schema\Blueprint;
  3. use Illuminate\Database\Migrations\Migration;
  4. /**
  5. * Class CreateAlbumsTable.
  6. */
  7. class CreateAlbumsTable extends Migration
  8. {
  9. /**
  10. * Run the migrations.
  11. *
  12. * @return void
  13. */
  14. public function up()
  15. {
  16. Schema::create('albums', function(Blueprint $table) {
  17. $table->increments('id');
  18. $table->integer('m_id')->default(0)->index('m_id')->comment('会员ID');
  19. $table->string('file_url')->comment('文件地址');
  20. $table->string('cover_url')->comment('文件封面');
  21. $table->string('time')->comment('视频文件时长');
  22. $table->tinyInteger('file_type')->index('file_type')->comment('文件类型 1:照片,2:视频');
  23. $table->tinyInteger('status')->default(0)->index('status')->comment('文件状态 0:待审,1:过审,2:人工审核中,3:审核不通过');
  24. $table->tinyInteger('is_del')->default(0)->index('is_del')->comment('是否删除 0:否,1:是');
  25. $table->timestamps();
  26. });
  27. }
  28. /**
  29. * Reverse the migrations.
  30. *
  31. * @return void
  32. */
  33. public function down()
  34. {
  35. Schema::drop('albums');
  36. }
  37. }