2020_08_21_145711_create_node_auth_table.php 905 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. class CreateNodeAuthTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('node_auth', function (Blueprint $table) {
  15. $table->increments('id');
  16. $table->unsignedInteger('node_id')->comment('授权节点ID');
  17. $table->char('key', 16)->comment('认证KEY');
  18. $table->char('secret', 8)->comment('通信密钥');
  19. $table->dateTime('created_at')->comment('创建时间');
  20. $table->dateTime('updated_at')->comment('最后更新时间');
  21. });
  22. }
  23. /**
  24. * Reverse the migrations.
  25. *
  26. * @return void
  27. */
  28. public function down()
  29. {
  30. Schema::dropIfExists('node_auth');
  31. }
  32. }