2022_10_18_154046_create_messages_table.php 869 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. use Illuminate\Database\Schema\Blueprint;
  3. use Illuminate\Database\Migrations\Migration;
  4. /**
  5. * Class CreateMessagesTable.
  6. */
  7. class CreateMessagesTable extends Migration
  8. {
  9. /**
  10. * Run the migrations.
  11. *
  12. * @return void
  13. */
  14. public function up()
  15. {
  16. Schema::create('messages', function(Blueprint $table) {
  17. $table->increments('id');
  18. $table->integer('m_id')->default('0')->comment('m_id');
  19. $table->string('username')->default('')->comment('username');
  20. $table->string('content')->default('')->comment('content');
  21. $table->string('reply')->default('')->comment('reply');
  22. $table->integer('show')->default('0')->comment('show');
  23. $table->timestamps();
  24. });
  25. }
  26. /**
  27. * Reverse the migrations.
  28. *
  29. * @return void
  30. */
  31. public function down()
  32. {
  33. Schema::drop('messages');
  34. }
  35. }