2019_07_03_102744_add_post_music_table.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class AddPostMusicTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('post_music', function (Blueprint $table) {
  15. $table->bigIncrements('id')->comment('表ID');
  16. $table->string('music_id',32)->index('idx_music_id')->default('')->nullable()->comment('音乐ID');
  17. $table->string('name')->nullable()->comment('音乐名称');
  18. $table->integer('music_duration')->default(0)->comment('音乐时长');
  19. $table->string('md5sum',32)->default('')->nullable()->comment('音乐MD5');
  20. $table->string('url')->nullable()->comment('音乐地址');
  21. $table->string('img')->nullable()->comment('分类图片');
  22. $table->string('singer',32)->nullable()->comment('音乐描述');
  23. $table->softDeletes();
  24. $table->timestamps();
  25. });
  26. }
  27. /**
  28. * Reverse the migrations.
  29. *
  30. * @return void
  31. */
  32. public function down()
  33. {
  34. //
  35. }
  36. }