2020_08_21_145711_create_node_auth_table.php 782 B

1234567891011121314151617181920212223242526272829303132
  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. * Run the migrations.
  8. *
  9. * @return void
  10. */
  11. public function up() {
  12. Schema::create('node_auth', function(Blueprint $table) {
  13. $table->increments('id');
  14. $table->unsignedInteger('node_id')->comment('授权节点ID');
  15. $table->char('key', 16)->comment('认证KEY');
  16. $table->char('secret', 8)->comment('通信密钥');
  17. $table->dateTime('created_at')->comment('创建时间');
  18. $table->dateTime('updated_at')->comment('最后更新时间');
  19. });
  20. }
  21. /**
  22. * Reverse the migrations.
  23. *
  24. * @return void
  25. */
  26. public function down() {
  27. Schema::dropIfExists('node_auth');
  28. }
  29. }