2020_08_20_141250_create_chat_files_table.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. class CreateChatFilesTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('chat_files', function (Blueprint $table) {
  15. $table->increments('id');
  16. $table->integer('did')->nullable()->default(0)->comment('对话ID');
  17. $table->string('group', 100)->nullable()->default('')->comment('群组');
  18. $table->string('name', 100)->nullable()->default('')->comment('文件名称');
  19. $table->integer('size')->nullable()->default(0)->comment('文件大小(B)');
  20. $table->string('ext', 20)->nullable()->default('')->comment('文件格式');
  21. $table->string('path')->nullable()->default('')->comment('文件地址');
  22. $table->string('thumb')->nullable()->default('')->comment('缩略图');
  23. $table->string('username')->nullable()->default('')->comment('上传用户');
  24. $table->bigInteger('indate')->nullable()->default(0);
  25. });
  26. }
  27. /**
  28. * Reverse the migrations.
  29. *
  30. * @return void
  31. */
  32. public function down()
  33. {
  34. Schema::dropIfExists('chat_files');
  35. }
  36. }